Download & Install pip packages offline

Viewed 7275

I have a virtual machine on my workplace that has no internet connection (and no docker and git). I want to install Rasa (it's an chatbot installed by Python pip package). Normally you would just type: "pip install rasa". This command doesn't function because the VM has no internet connection.

Now I installed Rasa on my private linux laptop to create a full list of dependencys that Rasa needs. How can I download all these pip packages at once? There are about 50 packages and downloading them all manually step-by-step would take many hours.

My intention is to download all requiered pip packages on my private laptop and move them (the .tar.gz files) to my Linux VM at work. After that I want to install all packages offline so that an internet connection isn't required.

1 Answers

Just make a requirements file:

pip freeze > requirements.txt

Then download all the packages and their dependencies:

pip download -r requirements.txt

Copy the packages to the target machine and deploy (into current dir with modules):

pip install -r requirements.txt --no-index --find-links .

Further reading is here: How to install packages offline?

Related