deepin 15.6无法安装wxpython 4.0.3
Tofloor
poster avatar
Feelup
deepin
2018-07-03 14:57
Author
本帖最后由 Feelup 于 2018-7-4 09:43 编辑

请问各位,我想在deepin15.6上安装python3用的wxpython 4.0.3,但使用如下命令安装,最后会报错。
命令:sudo pip3 install -U -f https://extras.wxpython.org/wxPy ... x/gtk3/ubuntu-18.04 wxPython

报错的提示太长,我复制到了文本文件中,各位能帮我看看,应该怎么安装吗?


补充一下吧,经过多次尝试,deepin15.6安装wxpython依旧失败。
但我想给各位希望使用python3,并安装wxpython4.0.3的某个人提供另外一个路径:
* 安装xubuntu 18.04     # 没办法,经过多次的轮回,才明白阿里的工程师说的没错,这个系统最适合学习和干活(当然日常使用也是很不错的选择)
* sudo apt install python3-pip
* sudo apt-get install libgtk-3-dev
* pip3 install -U   -f https://extras.wxpython.org/wxPy ... x/gtk3/ubuntu-18.04  wxPython
这样就可以直接用python3调用wxpython模块来写图形化程序了;希望对各位有用吧!
Reply Favorite View the author
All Replies
avatar
155******38
deepin
2018-07-03 17:25
#1
这错误提示这么明显,楼主你没看到你环境缺失?No package 'gtk+-3.0' found
    no
    *** Could not run GTK+ test program, checking why...
    *** The test program failed to compile or link. See the file config.log for the
    *** exact error that occured. This usually means GTK+ is incorrectly installed.
    configure: error:
    The development files for GTK+ were not found. For GTK+ 2, please
    ensure that pkg-config is in the path and that gtk+-2.0.pc is
    installed. For GTK+ 1.2 please check that gtk-config is in the path,
    and that the version is 1.2.3 or above. Also check that the
    libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
    --libs' are in the LD_LIBRARY_PATH or equivalent.
   
    Error running configure
    ERROR: failed building wxWidgets
    Traceback (most recent call last):
      File "build.py", line 1321, in cmd_build_wx
        wxbuild.main(wxDir(), build_options)
      File "/tmp/pip-build-da6b90v_/wxPython/buildtools/build_wxwidgets.py", line 375, in main
        "Error running configure")
      File "/tmp/pip-build-da6b90v_/wxPython/buildtools/build_wxwidgets.py", line 85, in exitIfError
        raise builder.BuildError(msg)
    buildtools.builder.BuildError: Error running configure
    Finished command: build_wx (0m5.217s)
    Finished command: build (0m5.217s)
    Command '"/usr/bin/python3" -u build.py build' failed with exit code 1.
安装gtk+-3.0或者pkg-config is in the path and that gtk+-2.0.pc is
    installed
Reply View the author
avatar
Feelup
deepin
2018-07-03 17:31
#2
https://bbs.deepin.org/post/159829
这错误提示这么明显,楼主你没看到你环境缺失?No package 'gtk+-3.0' found
    no
    *** Could not run ...

(⊙﹏⊙),这个我尝试安装过了,但提示因为很多关系系统的依赖关系而无法安装
Reply View the author
avatar
155******38
deepin
2018-07-03 20:11
#3
https://bbs.deepin.org/post/159829
(⊙﹏⊙),这个我尝试安装过了,但提示因为很多关系系统的依赖关系而无法安装 ...

gtk2.0或者3.0都行。你看看既然3.0安装不上,那就按照说明去配置2.0的环境变量
Reply View the author
avatar
iminto
deepin
2018-07-03 22:01
#4
换其他Linux吧,deepin的依赖与众不同,问题比较多
Reply View the author
avatar
Feelup
deepin
2018-07-04 17:35
#5
https://bbs.deepin.org/post/159829
gtk2.0或者3.0都行。你看看既然3.0安装不上,那就按照说明去配置2.0的环境变量 ...

哎,弄了半天还是不行,换了xubuntu,安装gtk3后直接就可以顺利安装wxpython4.03了
Reply View the author
avatar
xuming9
deepin
2019-01-29 23:13
#6
楼主你的问题我都踩过了,下了一堆依赖,你的问题已经解决,但最后都没报错信息了,都不知道怎么解决.我已经放弃wxpython了,
下面是我最后搞不定了的日志
  1. Finished command: build_wx (10m40.552s)
  2.     Running command: build_py
  3.     Checking for /tmp/pip-install-pb6jczsh/wxPython/bin/waf-2.0.8...
  4.     "/usr/local/python37/bin/python3.7" /tmp/pip-install-pb6jczsh/wxPython/bin/waf-2.0.8 --wx_config=/tmp/pip-install-pb6jczsh/wxPython/build/wxbld/gtk3/wx-config --gtk3 --python="/usr/local/python37/bin/python3.7" --out=build/waf/3.7/gtk3 configure build
  5.     Setting top to                           : /tmp/pip-install-pb6jczsh/wxPython
  6.     Setting out to                           : /tmp/pip-install-pb6jczsh/wxPython/build/waf/3.7/gtk3
  7.     Checking for 'gcc' (C compiler)          : /usr/bin/gcc
  8.     Checking for 'g++' (C++ compiler)        : /usr/bin/g++
  9.     Checking for program 'python'            : /usr/local/python37/bin/python3.7
  10.     Checking for python version >= 2.7.0     : 3.7.2
  11.     python-config                            : /usr/local/python37/bin/python3.7-config
  12.     Asking python-config for pyembed '--cflags --libs --ldflags' flags : yes
  13.     Testing pyembed configuration                                      : yes
  14.     Asking python-config for pyext '--cflags --libs --ldflags' flags   : yes
  15.     Testing pyext configuration                                        : Could not build python extensions
  16.     The configuration failed
  17.     (complete log in /tmp/pip-install-pb6jczsh/wxPython/build/waf/3.7/gtk3/config.log)
  18.     Command '"/usr/local/python37/bin/python3.7" /tmp/pip-install-pb6jczsh/wxPython/bin/waf-2.0.8 --wx_config=/tmp/pip-install-pb6jczsh/wxPython/build/wxbld/gtk3/wx-config --gtk3 --python="/usr/local/python37/bin/python3.7" --out=build/waf/3.7/gtk3 configure build ' failed with exit code 1.
  19.     Finished command: build_py (0m2.934s)
  20.     Finished command: build (10m43.486s)
  21.     Command '"/usr/local/python37/bin/python3.7" -u build.py build' failed with exit code 1.
Copy the Code
Reply View the author
avatar
xuming9
deepin
2019-01-30 00:41
#7
楼主使用这个命令
  1. sudo ./pip3 install https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04/wxPython-4.0.4-cp36-cp36m-linux_x86_64.whl
Copy the Code
Reply View the author