错误
检查GL / gl.h ...没有配置:错误:OpenGL库不可用运行配置错误错误:构建wxWidgets失败回溯(最近一次调用最后一次):文件“build.py”,第1321行,cmd_build_wx wxbuild.main (wxDir(),build_options)文件“/tmp/pip-build-1v9li5h1/wxpython/buildtools/build_wxwidgets.py”,第375行,主“错误运行configure”)文件“/ tmp / pip-build-1v9li5h1 / wxpython /buildtools/build_wxwidgets.py“,第85行,在exitIfError中生成builder.BuildError(msg)buildtools.builder.BuildError:运行配置错误完成命令:build_wx(0m5.163s)完成命令:build(0m5.163s)命令'” / usr / bin / python3“-u build.py build”失败,退出代码为1。
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-1v9li5h1/wxpython/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-nsn2w9dk-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-1v9li5h1/wxpython/
〜»python3
XXX-PC
Python 3.6.5 (default, May 11 2018, 13:30:17)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import sys
import wx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/xxx/.local/lib/python3.6/site-packages/wx/__init__.py", line 17, in <module>
from wx.core import *
File "/home/xxx/.local/lib/python3.6/site-packages/wx/core.py", line 12, in <module>
from ._core import *
ImportError:libjpeg.so.8:无法打开共享对象文件:没有这样的文件或目录
我通常会做以下事情:
pip3 install wxPython
如果这不起作用,那么您可能没有安装wxPython的依赖项之一:
我在Ubuntu上注意到我有时需要安装webkit,opengl等来安装wxPython。您的错误消息甚至提到OpenGL缺失,所以我会从那里开始。