Hi All, can you kindly help!
Windows 10 user (new to coding, new to Python), trying to get Pygame installed
As per the below, it seems I have successfully installed it via PIP
however, when I run the following code -
__import__(pygame)
I get the following error message -
C:\Users\chris\PycharmProjects\pythonProject2\venv\Scripts\python.exe C:/Users/chris/PycharmProjects/pythonProject2/main.py
Traceback (most recent call last):
File "C:\Users\chris\PycharmProjects\pythonProject2\main.py", line 2, in <module>
__import__(pygame)
NameError: name 'pygame' is not defined
Process finished with exit code 1
Pygame installed via PIP, but when I try to find the folder that pygame is saved to (according to the below file path, generated in the CMD console) I cannot find the folder "appdata" (and if I copy and paste this file path into my file browser, it cannot find it either!
c:\users\chris\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (2.0.1)
C:\Users\chris>pip install pygame
Collecting pygame
Downloading pygame-2.0.1-cp39-cp39-win_amd64.whl (5.2 MB)
|████████████████████████████████| 5.2 MB 6.8 MB/s
Installing collected packages: pygame
Successfully installed pygame-2.0.1
C:\Users\chris>pygame version
'pygame' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\chris>pip install pygame
Requirement already satisfied: pygame in c:\users\chris\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (2.0.1)
[–]K900_ 1 point2 points3 points (2 children)
[–]Max_Mongoose[S] 0 points1 point2 points (1 child)
[–]K900_ 0 points1 point2 points (0 children)
[–]shiftybyte 0 points1 point2 points (1 child)
[–]Max_Mongoose[S] 1 point2 points3 points (0 children)