1

I'm trying to install pygame within PyCharm. When I run pip install pygame in the PyCharm terminal I get error: command 'gcc' failed with exit status 1.

I tried what they explained here, but my results were unsuccesfull. When I ran sudo apt-get install python-dev as well as sudo apt-get install python3-dev I got sudo: apt-get: command not found.

I'm using macOS Mojave Version 10.14.5 by the way. I'm using the anaconda interpreter within PyCharm.

When I go to the macOS terminal and run pip install pygame I already have it installed, but it doesn't seem to sync with the PyCharm anaconda interpreter. When running pip list in both of the terminals I get completely different results.

I'm a beginner so please forgive me if this is unclear or if I'm doing something obviously wrong here.

User123
  • 37
  • 1
  • 6
  • 1
    apt-get is a tool for Debian/Ubuntu Linux systems and their derivatives. You need to find out how to install packages for MacOS (a quick google suggests that it's called "Homebrew") – Han-Kwang Nienhuys Jun 10 '20 at 20:23

1 Answers1

0

According to this question, the dev version comes built-in with python3 itself. You can try brew install python3 for that.