Why is my python module not importing ON linux

Question:

As you can see I have imported the modules correctly using pip install. I googled a bit why the module was not imported and I realized I have to add it to PATH. I did that too but now there is a new error something about a syntax error

File "pygame/__init__.py",
self.reason = f"{exc_type.__name__}: {self.info}"

Is this because my chrome book can not run Pygame or is the problem something else?

Picture of my terminal with the error:

enter image description here

Asked By: Samrud

||

Answers:

you need to run python3. to start python 3. Just running python starts python 2.7.

Answered By: Damiaan

you have your installed packages in python 3.9 version while your python environment is 2.7, look for python3 executable and try with that version

Answered By: omuthu
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.