Skip to content
Advertisement

Installing pip is not working in python < 3.6

I am trying to use these steps with bitbucket CI to deploy an application:

JavaScript

However, the python get-pip.py step fails with this error:

JavaScript

Why isn’t it working now? Does it depend on the operating system?


For the equivalent issue with upgrading pip in old Python installations, see Upgrading pip fails with syntax error caused by sys.stderr.write(f”ERROR: {exc}”).

Advertisement

Answer

pip 21.0 dropped support for Python 2 and 3.5. The later versions require Python 3.6+. The syntax f"" is supported by Python 3.6+.

To install pip for Python 2.7 install it from https://bootstrap.pypa.io/pip/2.7/ :

JavaScript

The last command is to upgrade to the latest supported version.

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