I can't run pygame in python 3.5, it says "the specified module could not be found"

If I already installed pygame for python 2.7, but then downloaded python 3.5 - how come I can’t copy/paste pygame into the site packages directory? It errors when I try to run a file using pygame in 3.5, it says “The specified module could not be found.”

Help?

2 Likes

This is because the version of pygame you download and works for python 2.7 is just for python 2.7.
This pygame version does not work for python 3.5 since the python 3.5 version is newer.

If you want to use pygame with python 3.5 you will need to download a compatible version that runs with it.

Just saw they even have it for python 3.6 now. https://www.pygame.org/wiki/GettingStarted

2 Likes

Why doesn’t it work when I try to pip install? Pip install says it’s already installed, so how would I install it for version 3.5 through pip?

2 Likes

Ok thanks, I think I got it

2 Likes

If you used pip for 2.7 and 3.5, then, did you install it for each of them, or for the same one twice?

If for any reason you have trouble telling them apart, you may want to invoke pip through the python executable that you are using to run the code, instead of a pip executable:
python -m pip arguments...

2 Likes