I want to download a module by typing 'pip install pygame' on cmd. But I am getting syntax error. I'm not in the python compiler either. I tried all the solutions on the internet. I'm still getting the same error. If I type 'pip --version' it's the same. how can i overcome this problem. You can see the error screenshot in below
Asked
Active
Viewed 54 times
-2
-
2Please copy-and-paste your error message into the question, rather than using an image. If you submit it as an image, it makes it hard for answerers to google the error message. – Nick ODell Sep 28 '21 at 23:22
-
1I think is better to install inside a virtualenv `python -m venv env` and then `env\Scripts\activate.bat` install: `pip install pygame` – Alex Sep 28 '21 at 23:28
-
This error indicates that someone tried to put a version of pip intended for Python 3.6 or above, into your Python 3.5 installation. It's a good time to update Python anyway, as you're quite out of date: 3.10.0 is expected to have its final release in a week or so. – Karl Knechtel Sep 28 '21 at 23:40
1 Answers
0
The "f
" syntax has been introduced in Python 3.6, while you're running on Python 3.5
Use a more recent version of Python.

Marcello Romani
- 2,967
- 31
- 40