我正在尝试安装wxPython,但是滚轮构建失败。该错误消息对于指出要做什么或在哪里寻找解决方法没有帮助。谁能帮助我了解如何正确制作此轮吗?
Machine: Linux on Power (this is not x86)
OS: RHEL Server, 7.5 (Maipo)
python version: Python 3.6.4
pip3 version: pip 19.3.1
我注意到this stack overflow post,这也没有帮助,因为我的Linux版本不在提供的列表中。
下面的链接我尝试了wxPython download page,下面的install with pip,但是在第5步中,基本上告诉您“查看日志并找出答案”。...没有帮助。
[我试图使用我非常有限的能力来手动破解wxPython软件包,并删除了一些依赖性.....还是一无所有。
<...>
Finished command: build_wx (1m56.907s)
Running command: build_py
Checking for /tmp/pip-req-build-dgnp13sp/bin/waf-2.0.8...
"/afs/apd.pok.ibm.com/u/mfacchin/wxenvlop/bin/python3" /tmp/pip-req-build-dgnp13sp/bin/waf-2.0.8 --wx_config=/tmp/pip-req-build-dgnp13sp/build/wxbld/gtk3/wx-config --gtk3 --python="/afs/apd.pok.ibm.com/u/mfacchin/wxenvlop/bin/python3" --out=build/waf/3.6/gtk3 configure build
Setting top to : /tmp/pip-req-build-dgnp13sp
Setting out to : /tmp/pip-req-build-dgnp13sp/build/waf/3.6/gtk3
Checking for 'gcc' (C compiler) : /bin/gcc
Checking for 'g++' (C++ compiler) : /bin/g++
Checking for program 'python' : /afs/apd.pok.ibm.com/u/mfacchin/wxenvlop/bin/python3
Checking for python version >= 2.7.0 : 3.6.4
python-config : /opt/xsite/cte/tools/python/3.6/bin/python3.6-config
Asking python-config for pyext '--cflags --libs --ldflags' flags : yes
Testing pyext configuration : Could not build python extensions
The configuration failed
(complete log in /tmp/pip-req-build-dgnp13sp/build/waf/3.6/gtk3/config.log)
Command '"/afs/apd.pok.ibm.com/u/mfacchin/wxenvlop/bin/python3" /tmp/pip-req-build-dgnp13sp/bin/waf-2.0.8 --wx_config=/tmp/pip-req-build-dgnp13sp/build/wxbld/gtk3/wx-config --gtk3 --python="/afs/apd.pok.ibm.com/u/mfacchin/wxenvlop/bin/python3" --out=build/waf/3.6/gtk3 configure build ' failed with exit code 1.
Finished command: build_py (0m6.991s)
Finished command: build (2m3.899s)
Command '"/afs/apd.pok.ibm.com/u/mfacchin/wxenvlop/bin/python3" -u build.py build' failed with exit code 1.
Building wheel for wxPython (setup.py): finished with status 'error'
ERROR: Failed building wheel for wxPython
<...>
看来您可能正在使用自定义Python构建。您的Python是使用--enable-shared
configure标志构建的吗?在Linux平台上,waf构建工具假定Python是采用这种方式构建的,并且将尝试与Python共享库链接,如果不存在,则会失败。
如果没有帮助,那么您可以从waf的配置日志中获取更多详细信息。当使用pip进行构建时,它将删除临时构建文件夹,然后才能使用它们。因此,如果您解压缩源归档文件并使用python3 build.py build
进行构建,则可以在./build/waf/3.6/gtk3/config.log
中找到日志,并希望在那里找到一些有用的线索。