我正在尝试通过 pip 安装一个名为“simpleguitk”的包。 (在 Ubuntu 16.04 和 Python 3.5 上)
运行后
sudo -H pip3 install simpleguitk
它说安装成功完成。 (除了实际上是可选的 pygame 依赖)
Collecting simpleguitk
Using cached SimpleGUITk-1.1.3.tar.gz
Collecting Pillow>=2.0.0 (from simpleguitk)
Using cached Pillow-3.4.2-cp35-cp35m-manylinux1_x86_64.whl
Collecting pygame>=1.9.0 (from simpleguitk)
Could not find a version that satisfies the requirement pygame>=1.9.0 (from simpleguitk) (from versions: 1.9.2.dev1, 1.9.2b7, 1.9.2b8)
No matching distribution found for pygame>=1.9.0 (from simpleguitk)
我在 /usr/local/lib/python3.5/dist-packages 或 /usr/lib/python3.5 或 /usr/lib/python3 找不到该包
当我尝试导入模块时,它说:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'simpleguitk'
我试图重新安装它,但正在运行:
sudo -H pip3 uninstall simpleguitk
返回:“无法卸载要求 simpleguitk,未安装”
我在 pip 8.1.2 和 pip 9.0.1 上都试过了,结果相同。我什至重新安装了 Ubuntu,但还是一样。
我认为 Python Path 是错误的,因为它没有 python 3.5,但我不知道如何修复它
['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/gtk-2.0']
原文由 RickSanchez725 发布,翻译遵循 CC BY-SA 4.0 许可协议
确保你正在为你正在使用的 python 版本安装它,使用