I wanted to "compile" the project on pygame using pyinstaller, but when opening the .exe file, this error pops up:
Asked
Active
Viewed 419 times
0
-
The error is right there, run `pip install pygame` – Adid Feb 09 '22 at 09:21
-
The `pygame` module is not installed on your device. Press Win+R>Type `cmd`>Press Enter> Type `pip install pygame`>Press Enter. Wait for it to install and the problem would be solved – Anshumaan Mishra Feb 09 '22 at 09:27
-
@AnshumaanMishra it didn't help. pygame was installed before that. When I try to install writes: Requirement already satisfied: pygame in c:\users\ав\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (2.0.2) – lobzinc Feb 09 '22 at 09:37
-
In the application you are using to execute the programs make sure you have selected the python interpreter at the path you mentioned i.e.`c:\users\ab\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39` – Anshumaan Mishra Feb 09 '22 at 09:52
-
2Possible duplicate of [How to install pygame?](https://stackoverflow.com/questions/23133462/how-to-install-pygame) – pppery Feb 09 '22 at 23:07
1 Answers
0
this could happen because either you havent installed pygame
do pip install pygame
to fix that or might be because python is not added to you path in environment variable steps to add python to path
or it might be that you haven't installed python check here to install it

Pratik Agrawal
- 405
- 3
- 17