Raspberry Pie 3安装wxpython时为什么会出错?

时间:2017-07-14 13:17:00

标签: python wxpython

enter image description here 我正在尝试在raspberry pi3上安装wxpython。

raspbian2.4.1 / Python 3.4 pip3 is version 9.0.1.
Firmware, Updates, Upgrades
Apt-get install libgtk2.0-dev
Apt-get install libgtk-3-dev
Apt-get install gstreamer1.0 *
Apt-get install libgstreamer-plugins-base1.0-dev
Apt-get install freeglut3-dev

如果在预安装后安装pip3 install wxpython,则无法继续安装,如图所示。怎么了? Cpu和ram的使用率飙升至100%。

---- 2017-07-17编辑----

谢谢大家的回复。我已经尝试了很多答案,但我仍然无法安装它。

我对Ubuntu 16.04没有任何问题,但我不知道为什么Raspberry Pie 3在Razbian中这样做。这是因为RazBian不完全支持Python 3吗?

我解压缩tar.gz并使用以下命令安装setup.py。我认为错误发生在webkit网关上。

Sudo apt-get install libwebkitgtk-3.0-dev
Sudo apt-get install libwebkitgtk-dev

我也尝试过安装Raspberry Pie 3 python3,wxpython凤凰版我错误怎么安装?

pi@raspberrypi:~/Downloads/wxPython-4.0.0a3 $ python3 setup.py install --user

        running install
        running build
        WARNING: Building this way assumes that all generated files have been
        generated already.  If that is not the case then use build.py directly
        to generate the source and perform the build stage.  You can use
        --skip-build with the bdist_* or install commands to avoid this
        message and the wxWidgets and Phoenix build steps in the future.

        "/usr/bin/python3" -u build.py build
        Will build using: "/usr/bin/python3"
        3.4.2 (default, Oct 19 2014, 13:31:11)
        [GCC 4.9.1]
        Python's architecture is 32bit
        cfg.VERSION: 4.0.0a3

        Running command: build
        Running command: build_wx
        wxWidgets build options: ['--wxpython', '--unicode', '--no_config']
        Configure options: ['--enable-unicode', '--with-opengl', '--enable-sound', '--enable-graphics_ctx', '--enable-mediactrl', '--enable-display', '--enable-geometry', '--enable-debug_flag', '--enable-optimise', '--disable-debugreport', '--enable-uiactionsim', '--with-sdl']
        /usr/bin/make
        make --jobs=4
        (if test -f utils/wxrc/Makefile ; then cd utils/wxrc && make all ; fi)
        make[1]: Entering directory '/home/pi/Downloads/wxPython-4.0.0a3/build/wxbld/utils/wxrc'
        make[1]: Nothing to be done for 'all'.     

    ........

    4.0.0a3/ext/wxWidgets/locale'
        Finished command: build_wx (0m3.803s)
        Running command: build_py
        Checking for /home/pi/Downloads/wxPython-4.0.0a3/bin/waf-1.7.15-p1...
        "/usr/bin/python3" /home/pi/Downloads/wxPython-4.0.0a3/bin/waf-1.7.15-p1 --wx_config=/home/pi/Downloads/wxPython-4.0.0a3/build/wxbld/wx-config --python="/usr/bin/python3" --out=build/waf/3.4 configure build
        Setting top to                           : /home/pi/Downloads/wxPython-4.0.0a3
        Setting out to                           : /home/pi/Downloads/wxPython-4.0.0a3/build/waf/3.4
        Checking for 'gcc' (c compiler)          : /usr/bin/gcc
        Checking for 'g++' (c++ compiler)        : /usr/bin/g++
        Checking for program python              : /usr/bin/python3
        Checking for python version              : (3, 4, 2, 'final', 0)
        Checking for library python3.4 in LIBDIR : not found
        Checking for library python3.4 in python_LIBPL : yes
        Checking for program /usr/bin/python3-config,python3.4-config,python-config-3.4,python3.4m-config : /usr/bin/python3-config
        Checking for header Python.h                                                                      : yes

......

        Waf: Leaving directory `/home/pi/Downloads/wxPython-.0.0a3/build/waf/3.4'
        Build failed
         -> task in '_html2' failed (exit status 1):
                {task 1943459824: cxx sip_html2wxWebViewEvent.cpp -> sip_html2wxWebViewEvent.cpp.17.o}
        ['/usr/bin/g++', '-fPIC', '-pthread', '-pthread', '-UNDEBUG', '-g', '-pthread', '-fwrapv', '-fstack-protector-strong', '-flto', '-fuse-linker-plugin', '-ffat-lto-objects', '-fno-strict-aliasing', '-I/home/pi/Downloads/wxPython-4.0.0a3/build/wxbld/lib/wx/include/gtk2-unicode-3.0', '-I/home/pi/Downloads/wxPython-4.0.0a3/ext/wxWidgets/include', '-I/home/pi/Downloads/wxPython-4.0.0a3/build/waf/3.4/sip/siplib', '-I/home/pi/Downloads/wxPython-4.0.0a3/sip/siplib', '-I/home/pi/Downloads/wxPython-4.0.0a3/build/waf/3.4/src', '-I/home/pi/Downloads/wxPython-4.0.0a3/src', '-I/usr/include/python3.4m', '-DPYTHONDIR="/usr/local/lib/python3/dist-packages"', '-DPYTHONARCHDIR="/usr/local/lib/python3/dist-packages"', '-DHAVE_PYTHON_H=1', '-DHAVE_WX=1', '-DHAVE_WXADV=1', '-DHAVE_WXSTC=1', '-DHAVE_WXHTML=1', '-DHAVE_WXGL=1', '-DHAVE_WXWEBVIEW=1', '-DHAVE_WXXML=1', '-DHAVE_WXXRC=1', '-DHAVE_WXRICHTEXT=1', '-DHAVE_WXMEDIA=1', '-DHAVE_WXRIBBON=1', '-DHAVE_WXPROPGRID=1', '-DHAVE_WXAUI=1', '-D_FILE_OFFSET_BITS=64', '-DWXUSINGDLL', '-D__WXGTK__', '../../../sip/cpp/sip_html2wxWebViewEvent.cpp', '-c', '-o', 'sip/cpp/sip_html2wxWebViewEvent.cpp.17.o']
         -> task in '_html2' failed (exit status 1):
                {task 1943459632: cxx sip_html2cmodule.cpp -> sip_html2cmodule.cpp.17.o}
        ['/usr/bin/g++', '-fPIC', '-pthread', '-pthread', '-UNDEBUG', '-g', '-pthread', '-fwrapv', '-fstack-protector-strong', '-flto', '-fuse-linker-plugin', '-ffat-lto-objects', '-fno-strict-aliasing', '-I/home/pi/Downloads/wxPython-4.0.0a3/build/wxbld/lib/wx/include/gtk2-unicode-3.0', '-I/home/pi/Downloads/wxPython-4.0.0a3/ext/wxWidgets/include', '-I/home/pi/Downloads/wxPython-4.0.0a3/build/waf/3.4/sip/siplib', '-I/home/pi/Downloads/wxPython-4.0.0a3/sip/siplib', '-I/home/pi/Downloads/wxPython-4.0.0a3/build/waf/3.4/src', '-I/home/pi/Downloads/wxPython-4.0.0a3/src', '-I/usr/include/python3.4m', '-DPYTHONDIR="/usr/local/lib/python3/dist-packages"', '-DPYTHONARCHDIR="/usr/local/lib/python3/dist-packages"', '-DHAVE_PYTHON_H=1', '-DHAVE_WX=1', '-DHAVE_WXADV=1', '-DHAVE_WXSTC=1', '-DHAVE_WXHTML=1', '-DHAVE_WXGL=1', '-DHAVE_WXWEBVIEW=1', '-DHAVE_WXXML=1', '-DHAVE_WXXRC=1', '-DHAVE_WXRICHTEXT=1', '-DHAVE_WXMEDIA=1', '-DHAVE_WXRIBBON=1', '-DHAVE_WXPROPGRID=1', '-DHAVE_WXAUI=1', '-D_FILE_OFFSET_BITS=64', '-DWXUSINGDLL', '-D__WXGTK__', '../../../sip/cpp/sip_html2cmodule.cpp', '-c', '-o', 'sip/cpp/sip_html2cmodule.cpp.17.o']
         -> task in '_html2' failed (exit status 1):
                {task 1943459760: cxx sip_html2wxWebViewArchiveHandler.cpp -> sip_html2wxWebViewArchiveHandler.cpp.17.o}
        ['/usr/bin/g++', '-fPIC', '-pthread', '-pthread', '-UNDEBUG', '-g', '-pthread', '-fwrapv', '-fstack-protector-strong', '-flto', '-fuse-linker-plugin', '-ffat-lto-objects', '-fno-strict-aliasing', '-I/home/pi/Downloads/wxPython-4.0.0a3/build/wxbld/lib/wx/include/gtk2-unicode-3.0', '-I/home/pi/Downloads/wxPython-4.0.0a3/ext/wxWidgets/include', '-I/home/pi/Downloads/wxPython-4.0.0a3/build/waf/3.4/sip/siplib', '-I/home/pi/Downloads/wxPython-4.0.0a3/sip/siplib', '-I/home/pi/Downloads/wxPython-4.0.0a3/build/waf/3.4/src', '-I/home/pi/Downloads/wxPython-4.0.0a3/src', '-I/usr/include/python3.4m', '-DPYTHONDIR="/usr/local/lib/python3/dist-packages"', '-DPYTHONARCHDIR="/usr/local/lib/python3/dist-packages"', '-DHAVE_PYTHON_H=1', '-DHAVE_WX=1', '-DHAVE_WXADV=1', '-DHAVE_WXSTC=1', '-DHAVE_WXHTML=1', '-DHAVE_WXGL=1', '-DHAVE_WXWEBVIEW=1', '-DHAVE_WXXML=1', '-DHAVE_WXXRC=1', '-DHAVE_WXRICHTEXT=1', '-DHAVE_WXMEDIA=1', '-DHAVE_WXRIBBON=1', '-DHAVE_WXPROPGRID=1', '-DHAVE_WXAUI=1', '-D_FILE_OFFSET_BITS=64', '-DWXUSINGDLL', '-D__WXGTK__', '../../../sip/cpp/sip_html2wxWebViewArchiveHandler.cpp', '-c', '-o', 'sip/cpp/sip_html2wxWebViewArchiveHandler.cpp.17.o']
         -> task in '_html2' failed (exit status 1):
                {task 1943459696: cxx sip_html2wxWebView.cpp -> sip_html2wxWebView.cpp.17.o}
        ['/usr/bin/g++', '-fPIC', '-pthread', '-pthread', '-UNDEBUG', '-g', '-pthread', '-fwrapv', '-fstack-protector-strong', '-flto', '-fuse-linker-plugin', '-ffat-lto-objects', '-fno-strict-aliasing', '-I/home/pi/Downloads/wxPython-4.0.0a3/build/wxbld/lib/wx/include/gtk2-unicode-3.0', '-I/home/pi/Downloads/wxPython-4.0.0a3/ext/wxWidgets/include', '-I/home/pi/Downloads/wxPython-4.0.0a3/build/waf/3.4/sip/siplib', '-I/home/pi/Downloads/wxPython-4.0.0a3/sip/siplib', '-I/home/pi/Downloads/wxPython-4.0.0a3/build/waf/3.4/src', '-I/home/pi/Downloads/wxPython-4.0.0a3/src', '-I/usr/include/python3.4m', '-DPYTHONDIR="/usr/local/lib/python3/dist-packages"', '-DPYTHONARCHDIR="/usr/local/lib/python3/dist-packages"', '-DHAVE_PYTHON_H=1', '-DHAVE_WX=1', '-DHAVE_WXADV=1', '-DHAVE_WXSTC=1', '-DHAVE_WXHTML=1', '-DHAVE_WXGL=1', '-DHAVE_WXWEBVIEW=1', '-DHAVE_WXXML=1', '-DHAVE_WXXRC=1', '-DHAVE_WXRICHTEXT=1', '-DHAVE_WXMEDIA=1', '-DHAVE_WXRIBBON=1', '-DHAVE_WXPROPGRID=1', '-DHAVE_WXAUI=1', '-D_FILE_OFFSET_BITS=64', '-DWXUSINGDLL', '-D__WXGTK__', '../../../sip/cpp/sip_html2wxWebView.cpp', '-c', '-o', 'sip/cpp/sip_html2wxWebView.cpp.17.o']
        Command '"/usr/bin/python3" /home/pi/Downloads/wxPython-4.0.0a3/bin/waf-1.7.15-p1 --wx_config=/home/pi/Downloads/wxPython-4.0.0a3/build/wxbld/wx-config --python="/usr/bin/python3" --out=build/waf/3.4 configure build ' failed with exit code 1.
        Finished command: build_py (0m18.606s)
        Finished command: build (0m22.411s)
        Command '"/usr/bin/python3" -u build.py build' failed with exit code 1.

在raspbian中,添加software-wxpython搜索。安装所有wxwidgets后,安装了wxpython模块。 我用pip3列表检查了wxpython(4.0.0a3)并将其导入python3。

我不知道安装了什么wxwidgets,但感谢所有回答的人。

0 个答案:

没有答案