I just installed the beta version of Python 3.10
, opened VS Code, changed the Python Interpreter to Python 3.10 64 bit (my PC works with 64 bit) and managed to continue working on my Pygame Project.
Yet, as I runned the code, I faced the ModuleNotFoundError
that said : no module named Pygame.
(though the pygame module is perfectly installed)
So was that because of the beta version of Python? if yes, aren't there some ways to work with pygame and python3.10 at the same time ?
@Edster's answer is much better. I was in fact running an intel macbook at the time and was not aware of the universal installer issues. This is likely not relevant to anybody any more, as I'm editing this four years after the fact and there are already new versions of all of the mentioned packages and programming languages and operating systems, but in case anybody stumbles over this for some reason, go read the other answer.
I think it may be a compatibility issue.
pip3.9 install pygame
works just fine.
pip3.10 install pygame
returns a slew of errors. Some of them were pip/pygame bugs having to do with wheels and dependencies. So I cloned the pygame source repository locally and tried to build it from source.
python3.9 setup.py build;
python3.9 setup.py install
works as expected.
python3.10 setup.py build;
python3.10 setup.py install
reaches the critical limit of 20 errors and decides it's done. I've tried a variety of workarounds and solutions that worked for older versions of both pygame and python but unfortunately nothing has worked, so I think it really is just a compatibility issue and we'll have to wait for pygame to update to work with python 3.10.