Solution 2 · Install Python, and remember the install location · Go here and download pygame-1.9. · Move the downloaded . · Open a command prompt in ...
12.07.2021 · This answer is not useful. Show activity on this post. Remember to use pip3 on MacOS, pip is for Python 2. Try this: pip3 install pygame. and then. python3 -c "import pygame". If the second works, but in VSCode it doesn't, remember to use Python 3, instead of 2 …
25.11.2017 · ModuleNotFoundError: No module named 'pygame.locals'; 'pygame' is not a package And if I type -python to the shell and then type import pygame it works like a charm. So In summary: If I want to execute pygame.py, it does not see the module, but it sees the module after typing python and import pygame (works without error).
Aug 19, 2013 · I had the same problem and discovered that Pygame doesn't work for Python3 at least on the Mac OS, but I also have Tython2 installed in my computer as you probably do too, so when I use Pygame, I switch the path so that it uses python2 instead of python3.
04.10.2021 · Pip is the package manager that python uses to keep track of all libraries installed. To check the list of installed libraries, you can run the following: pip freeze. Output: py==1.8.1 pyasn1==0.4.5 pygame==1.9.4 pygubu==0.9.8.6 pyparsing==2.4.7 pytest==5.4.1. After running the pip freeze command, you will see the list of all python libraries ...
Oct 04, 2021 · Pip is the package manager that python uses to keep track of all libraries installed. To check the list of installed libraries, you can run the following: pip freeze. Output: py==1.8.1 pyasn1==0.4.5 pygame==1.9.4 pygubu==0.9.8.6 pyparsing==2.4.7 pytest==5.4.1. After running the pip freeze command, you will see the list of all python libraries ...
Nov 25, 2017 · ModuleNotFoundError: No module named 'pygame.locals'; 'pygame' is not a package And if I type -python to the shell and then type import pygame it works like a charm. So In summary: If I want to execute pygame.py, it does not see the module, but it sees the module after typing python and import pygame (works without error).
18.08.2013 · I had the same problem and discovered that Pygame doesn't work for Python3 at least on the Mac OS, but I also have Tython2 installed in my computer as you probably do too, so when I use Pygame, I switch the path so that it uses python2 instead of python3.I use Sublime Text as my text editor so I just go to Tools > Build Systems > New Build System and enter the …
Jul 12, 2021 · Remember to use pip3 on MacOS, pip is for Python 2. Try this: pip3 install pygame. and then. python3 -c "import pygame". If the second works, but in VSCode it doesn't, remember to use Python 3, instead of 2 for VSCode. Share. Improve this answer. Follow this answer to receive notifications.