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

Raspberry Pie 3安装wxpython时为什么会出错?,python,wxpython,Python,Wxpython,我正在尝试在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 Ap

我正在尝试在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这样做。这是因为Python3不完全受RazBian支持吗

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

Sudo apt-get install libwebkitgtk-3.0-dev
Sudo apt-get install libwebkitgtk-dev
我也尝试过安装覆盆子派3蟒蛇,WxPythonPhoenix版本我做错了怎么安装

pi@raspberrypi:~/Downloads/wxPython-4.0.0a3$python3 setup.py安装--用户

        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中,添加软件wxpython search。安装所有wxwidgets后,将安装wxpython模块。 我用pip3列表检查了wxpython(4.0.0a3),并将其导入到python3中


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

您使用的是
sudo
?是
sudo
usedc您能在上面显示的内容之前看到构建输出吗?显示的错误没有意义,除非cmdproc.h文件已被破坏(这似乎不太可能)。在这之前可能还有其他错误,在上面所示的点上,这些错误会使事情变得混乱。如果没有,那么下一步将是获取源tarball,并尝试自己运行一个没有pip的构建。请参阅源代码树中的README.rst。在原始海报上:最后两段似乎表明您最终成功安装了wxPython Phoenix。如果是这样,您是否介意发布一个问题的答案,概述精确的步骤(您的最后两句话听起来很不清楚)。您是否使用
sudo
?是
sudo
usedc您可以在上面显示的内容之前看到构建输出吗?显示的错误没有意义,除非cmdproc.h文件已被破坏(这似乎不太可能)。在这之前可能还有其他错误,在上面所示的点上,这些错误会使事情变得混乱。如果没有,那么下一步将是获取源tarball,并尝试自己运行一个没有pip的构建。请参阅源代码树中的README.rst。在原始海报上:最后两段似乎表明您最终成功安装了wxPython Phoenix。如果是这样的话,你是否介意对你的问题发表一个答案,概述确切的步骤(你的最后两句话对我来说听起来很不清楚)。