【发布时间】:2020-09-30 09:12:08
【问题描述】:
我正在尝试在 PyCharm 中安装 pygame。当我在 PyCharm 终端中运行pip install pygame 时,我得到error: command 'gcc' failed with exit status 1。
我尝试了他们解释的here,但我的结果不成功。当我运行sudo apt-get install python-dev 和sudo apt-get install python3-dev 时,我得到了sudo: apt-get: command not found。
顺便说一下,我使用的是 macOS Mojave 版本 10.14.5。我在 PyCharm 中使用 anaconda 解释器。
当我转到 macOS 终端并运行 pip install pygame 时,我已经安装了它,但它似乎与 PyCharm anaconda 解释器不同步。在两个终端中运行 pip list 时,我得到完全不同的结果。
我是初学者,所以如果不清楚或者我在这里做的事情明显错误,请原谅我。
【问题讨论】:
-
apt-get 是一个用于 Debian/Ubuntu Linux 系统及其衍生系统的工具。您需要了解如何为 MacOS 安装软件包(一个快速的 google 建议它被称为“Homebrew”)
标签: python python-3.x error-handling pip pycharm