How to install pip in RHEL6 to use "virualenv" with python 2.6.6

241 Views Asked by At

Background:

Robot scripts are developed on Python 3.* and they can only be executed in python3.

Problem:

We have RHEL6 machine which uses python 2.6.6 which cannot be updated.

Prepared Solution :

We are trying to enable the use of virtualenv in a RHEL6 machine so that we can execute the robot scripts in virtual environment with a different python version, We are facing issues with installation of pip in RHEL6 machine.

1

There are 1 best solutions below

1
phd On

You need pip/setuptools from here: https://bootstrap.pypa.io/2.6/ and you need a very old version of virtualenv.

Download get-pip.py and run

sudo python2.6 get-pip.py

virtualenv 15.2.0 seems to be the last version that supports Python 2.6. Try

python2.6 -m pip install 'virtualenv==15.2.0'

or

python2.6 -m pip install 'virtualenv<16.0'

with you fresh pip.