【发布时间】:2019-09-02 14:33:08
【问题描述】:
我尝试开始使用 Glade 软件来制作一些与 Python 集成的 GUI。当我尝试在我的代码上导入 gi 时,我收到与版本相关的错误。没有满足要求的版本。 Pycharm 建议运行此命令pip install gi,但我收到相同的错误。有任何想法吗?
这是故障排除的屏幕截图:https://imgur.com/a/hPlH0CZ 谢谢
弃用:
Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting gi
ERROR: Could not find a version that satisfies the requirement gi (from versions: none)
ERROR: No matching distribution found for gi
【问题讨论】:
-
从这里我猜你正在运行 Python 2.7,这是一个坏主意,正如弃用警告所述。可能 pip 根本不包括 Python 2.7 的 Gi。做明智的事:升级到 Python 3.x
-
非常感谢Adriaan,我将项目设置中的解释器更改为Python3.6,现在安装新包时没有错误!