pip 无法解析 Ubuntu 软件包的依赖关系

pip 无法解析 Ubuntu 软件包的依赖关系

我想要升级psychopyPython 2 的软件包:

$ sudo -H pip2 install --upgrade psychopy
Collecting psychopy
Collecting pillow (from psychopy)
  Using cached Pillow-5.0.0-cp27-cp27mu-manylinux1_x86_64.whl
Collecting pyqt5 (from psychopy)
  Could not find a version that satisfies the requirement pyqt5 (from psychopy) (from versions: )
No matching distribution found for pyqt5 (from psychopy)

我猜pyqt5不支持在 Linux 上从 PyPI 安装 Python 2。我有 Ubuntu 软件包pyqt5-devpython-pyqt5安装了,但 pip 似乎并不关心。

我正在运行 Artful。

答案1

我认为最简单的方法是使用以下命令获取所有构建依赖项:

sudo apt-get build-dep psychopy
sudo apt-get install psychopy

sudo apt-get install libgtk2.0-dev libgtk-3-dev mesa-common-dev \
libglu1-mesa-dev libqt5gstreamer-dev libwebkitgtk-dev libwebkitgtk-3.0-dev \
libgstreamer-plugins-bad1.0-dev \
libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev

然后使用 pip 安装它:

sudo -H pip2 install --upgrade psychopy

相关内容