Pip安装错误(Pyside到Raspberry Pi)

2024-10-03 23:20:47 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图pip install pyside到我的树莓Pi,并收到以下错误:

pi@raspberrypi:/ $ sudo pip install pyside
Collecting pyside
  Using cached https://files.pythonhosted.org/packages/36/ac/ca31db6f2225844d37a41b10615c3d371587677efd074db29855e7035de6/PySide-1.2.4.tar.gz
Building wheels for collected packages: pyside
  Running setup.py bdist_wheel for pyside ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-TXwQwt/pyside/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmps80BMupip-wheel- --python-tag cp27:
  Removing /tmp/pip-build-TXwQwt/pyside/pyside_package
  running bdist_wheel
  running build
  Python architecture is 32bit
  error: Failed to find cmake. Please specify the path to cmake with --cmake parameter.

  ----------------------------------------
  Failed building wheel for pyside
  Running setup.py clean for pyside
Failed to build pyside
Installing collected packages: pyside
  Running setup.py install for pyside ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-TXwQwt/pyside/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-5BdNE7-record/install-record.txt --single-version-externally-managed --compile:
    Removing /tmp/pip-build-TXwQwt/pyside/pyside_package
    running install
    running build
    Python architecture is 32bit
    error: Failed to find cmake. Please specify the path to cmake with --cmake parameter.

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-TXwQwt/pyside/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-5BdNE7-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-TXwQwt/pyside/
pi@raspberrypi:/ $

我尝试过用sudo pip install setuptools --no-use-wheel --upgradesudo apt install -y libmysqlclient-devpython setup.py install、和{}来修复它,但是没有一个能让我安装Pyside。任何帮助都将不胜感激。谢谢您。在

如果有关系的话,我要用覆盆子皮3做拉斯比伸展运动。在


Tags: installpippybuildcmakesetupcodeopen
3条回答

您可以从https://www.piwheels.org/尝试precompiled wheels

Pi没有pyside二进制控制盘,因此需要安装大量的prerequisites并从源代码进行编译:

sudo apt-get install build-essential git cmake libqt4-dev libphonon-dev python2.7-dev libxml2-dev libxslt1-dev qtmobility-dev libqtwebkit-dev

您使用的是哪个python版本,因为这个模块只支持下面列出的版本。在

[(2.6), (2.7), (3.2), (3.3), (3.4)]

这看起来不言自明。在

您正在不受支持的python版本上安装该模块。在

尝试使用pip2 install pyside安装

相关问题 更多 >