无法在Raspberry Pi上安装wxPython

时间:2018-09-10 16:45:27

标签: python module raspberry-pi wxpython

我无法在树莓派3(Rasbpain)上安装wxpython。

当我尝试“ pip3 install wxPython”时,我得到了以下内容(它抱怨未安装gtk + 3.0。

checking for GTK+ - version >= 3.0.0... Package gtk+-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-3.0' found
Package gthread-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing 'gthread-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gthread-2.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-0mqfn30q/wxPython/buildtools/build_wxwidgets.py", line 375, in main "Error running configure")
File "/tmp/pip-build-0mqfn30q/wxPython/buildtools/build_wxwidgets.py", line 85, in exitIfError
  raise builder.BuildError(msg)
buildtools.builder.BuildError: Error running configure
Finished command: build_wx (0m57.278s)
Finished command: build (0m57.279s)
Command '"/usr/bin/python3" -u build.py build' failed with exit code 1.

----------------------------------------
Failed building wheel for wxPython
Running setup.py clean for wxPython
Failed to build wxPython
Installing collected packages: PyPubSub, six, wxPython
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
 status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 360, in run
prefix=options.prefix_path,
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/usr/lib/python3/dist-packages/pip/wheel.py", line 247, in move_wheel_files
prefix=prefix,
File "/usr/lib/python3/dist-packages/pip/locations.py", line 153, in distutils_scheme
i.finalize_options()
File "/usr/share/python-wheels/setuptools-33.1.1-py2.py3-none-any.whl/setuptools/command/install.py", line 38, in finalize_options
orig.install.finalize_options(self)
File "/usr/lib/python3.5/distutils/command/install.py", line 350, in finalize_options
self.create_home_path()
File "/usr/lib/python3.5/distutils/command/install.py", line 575, in create_home_path
os.makedirs(path, 0o700)
File "/usr/lib/python3.5/os.py", line 241, in makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/home/pi/.local/lib/python3.5/site-packages'

如上所述,当我尝试安装gtk + 3.0时,出现了另一个问题。 libgtk +与树莓派架构不兼容吗?还是我错过了什么?

pi@raspberrypi:~$ sudo apt-get install libgtk-3-0-dbg
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libgtk-3-0-dbg : Depends: libgtk-3-0 (= 3.4.2-7+deb7u1) but 3.22.11-1+rpi3     is to be installed
E: Unable to correct problems, you have held broken packages.

0 个答案:

没有答案