there, I am newbie, and I am learning pygame, but my Pycharm and Visual studio in Mac always have something wrong of pygame. I have install the pygame with pip, and it is say, 'Requirement already satisfied: pygame in /usr/local/lib/python3.9/site-packages (2.0.1)'. And today I open the Visual studio, 'ImportError: No module named pygame'. Also, the pycharm is there every time if i do a new project I must re-setting the file again to install the pygame packet? why Pygame cannot be a default module but have to set again and again. Because I am living in China and first time to run code and mac Os, if there is any tutorials for me to set the pygame, pycharm, and visual studio, and so much thank you.
Asked
Active
Viewed 175 times
1 Answers
0
Pycharm projects have a virtual environment that may not have access to the same packages as your host system. To make sure pygame is installed on the virtual environment, go to
File > Settings > Project: ____ > Python Interpreter
It will list all packages on the virtual environment. To add pygame if it's not there, go to the + sign in the bottom left corner, type in pygame, and hit Install Package

lwashington27
- 320
- 2
- 14