[solved] Installing pip is not working in python < 3.6?

Hello Guys How are you all? Hope you all are fine.  Today I Have Faced Installing pip is not working in python < 3.6 In Python. Installing pip is not working in python < 3.6 So Here I am Explain to you all the possible solutions Here.

Without Wasting your time, Lets start This Article to Solve This Error in Anaconda

How Installing pip is not working in python < 3.6 error Occurs ?

I am starting to make a app using bitbucket CI and i am using the following steps to deploy the application and the steps to install pip is failing.

    - apt-get update
    - apt-get install -y python-dev
    - curl -O
    - python
    ... and a few more steps

Dont know why but python step fails with the following error.

Traceback (most recent call last):
  File "", line 24226, in <module>
  File "", line 199, in main
  File "", line 82, in bootstrap
    from pip._internal.cli.main import main as pip_entry_point
  File "/tmp/tmpUgc5ng/", line 60
    sys.stderr.write(f"ERROR: {exc}")

SyntaxError: invalid syntax

This worked fine upto yesterday. Not sure why this is not working now.

I thought it may be because of windows but i checked in my local machine running linux but these steps but they worked fine.

How to solve Installing pip is not working in python < 3.6 ?


question: Installing pip is not working in python < 3.6


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 :

- curl -O
- python
- python -m pip install --upgrade "pip < 21.0"

The last command is to upgrade to the latest supported version. For Python 2.7 the latest supported is currently pip 20.3.4.

For Python 3.4 install from . For Python 3.5 — .

For Python 3.4 the upgrade command is

- python -m pip install --upgrade "pip < 19.2"


I have also tried all thing but my solution was download old get-pip version and install.

  1. download: curl -O the file
  2. install: python or python2
  3. enjoy

This is worked on Debian systems


It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also Read

Leave a Comment