Pygame Already Installed; However, Python Terminal Says "No Module Named 'Pygame' " (Ubuntu 20.04.1)

Pygame already installed; however, python terminal says No module named 'pygame' (Ubuntu 20.04.1)

There isn't a release build of pygame 1.9.6 for Python 3.8.2. Install a development version:

python3 -m pip install pygame==2.0.0.dev10

Pygame error Video system not initialized on ubuntu server with only terminal

Thank for your answer jsbueno. I was able to found a solution a few weeks ago but forget to answer the question.

I wasn't able to run any pygame script with any other library than X11. But I found that one can run the script with no graphics library. Just setting the SDL_VIDEOLIBRARY enviroment variable to "dummy".

This is posible on bash but I prefer to do it on python:

os.environ["SDL_VIDEODRIVER"] = "dummy"

With this I was able to run the pygame script, detect joystick events, etc.



Related Topics



Leave a reply



Submit