Fix pip upgrade error in HDP Sandbox Linux VM

Foong Min Wong
2 min readDec 3, 2021

--

I was working on something inside an older version of Hortonworks Data Platform (HDP) Sandbox virtual machine. When I tried to do pip install --upgrade pip , it throws an error saying:

Command “python setup.py egg_indo" failed with error code 1 in /tmp/pip-build-Cv_Pb3/pip/
You are using pip version 8.1.2, however version 21.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

I receive the message again even though I have run the upgrade pip command. There is a solution to fix this by using virtualenv. You can go for this approach, but I prefer another method from here.

Since the terminal runs Python 2.7 (which pip 21.0 dropped support for Python 2), you have to install pip from here.

Before doing it, remember to uninstall the current pip by running sudo python -m pip uninstall pip

Then, run the following commands provided by this user from Stack Overflow.

  1. curl -O https://bootstrap.pypa.io/pip/2.7/get-pip.py
  2. sudo -E python get-pip.py

You can proceed to upgrade pip version from19.1.1 to 21.3.1 further ⤴️

--

--

No responses yet