Can I create a virtualenv offline (without internet) on CentOS/Redhat?

Kiron asked:

Can I create a virtualenv offline (without internet) on CentOS/Redhat? if yes what are all the dependencies I’ve to download? with python 2.7

My answer:


You can’t create a virtualenv offline, nor can you easily install Python packages offline anyway.

What you can do is to create the virtualenv and install your desired packages from another CentOS machine connected to the Internet, and then copy the entire directory structure to the offline machine. Keep in mind that the path of the virtualenv directory is hardcoded into many files in the <virtualenv_name>/bin directory, and if you need the directory to be different on the destination machine, you need to edit all these manually.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.