I need to deploy python application to a no internet server.
I have created a virtual environment on my host machine which uses Ubuntu. This contains python script with a variety of non-standard libraries. I have used option --relocatable
to make the links relative.
I have copied over the environment to my client machine which uses RedHat and has no access to the internet.
After activating it using source my_project/bin/activate
the environment does not seem to be working - the python used is standard system one and the libraries don't work.
How can the virtual environment be deployed on a different server?
Edit: this is normally done through the creation of requirement.txt
file and then using pip to install the libraries on the target machine, however in this case it's not possible as the machine is offline.
For anyone dealing with the same problem: The quickest way for me was to:
pip download
pip install --no-index --find-links pip_libs/ requests