【发布时间】:2016-07-19 21:24:54
【问题描述】:
我正在尝试在 pycharm 上导入 pygame,我已经安装了 pygame,当我通过命令行执行程序时它会运行,但是当我尝试从 pycharm 使用它时它不起作用。我尝试将其添加到项目解释器中,但出现错误:
Non-zero exit code (1)
Collecting Pygame
No matching distribution found for Pygame the requirement Pygame (from versions: )
还从命令行尝试了pip install Pygame,但发生了:
Collecting Pygame
Could not find a version that satisfies the requirement Pygame (from versions: )
No matching distribution found for Pygame
我正在运行 python 3.5 和 pygame v1.9.1 并且 pycharm 已更新。 操作系统:Linux Mint 17.3
【问题讨论】:
-
type
import pygameat the top at a python file in pycharm ...当 pycharm 用红色下划线时,单击它,使光标位于单词pygame上(即,如果您输入了它会让 pygame 说一个不同的词)...按 alt+enter,选择“安装丢失的包”选项...pycharm 将确保它可用于您正在使用的解释器... -
要为python 3安装它,你必须使用
pip3 install -
总是同样的错误:非零退出代码(1)
标签: python python-3.x pygame pycharm