簡體   English   中英

如何在linux中用python3安裝wxpython?,給我錯誤

[英]How install wxpython with python3 in linux?, gives me error

錯誤

檢查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缺失,所以我會從那里開始。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM