Skip to content
Advertisement

“SyntaxError: invalid syntax” while installing Setuptools

I needed to install Setuptools for a project I was doing, and I had to download Setuptools through a .tar file (don’t ask), but when ran the command I needed to use to install it:

JavaScript

It ended up with a SyntaxError:

JavaScript

I’m using Python 2.7.

Why is it showing the error, and how can I fix it?

Edit:

When I looked into the __init__.py file, I found that there was something called an “invalid marker”:

JavaScript

Advertisement

Answer

The last version of setuptools to support Python 2.7 was 44.1.1 (Jan 2020). See the changelog.

Upgrade your Python version in order to use setuptools 51.1.1.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement