K
K
Kostyan4ik2020-06-23 21:36:58
Python
Kostyan4ik, 2020-06-23 21:36:58

How to install python modules without internet and pip?

There was a problem, there is a main PC on which there is Internet and pip, but the packages need to be installed on a computer on which there is no Internet, and there is no way to install pip.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Pankov, 2020-06-23
@Kostyan4ik

Kostyan4ik , why is this not possible? With python, you can always find some possibility.
Here, for example, you can download all the necessary packages using the same pip on the computer where there is a python and the Internet:
pip download pip
So you can download all the necessary packages and bring them to a machine without an Internet, just on a USB flash drive.
And there:

python pip-20.1.1-py2.py3-none-any.whl/pip install pip-20.1.1-py2.py3-none-any.whl

This is where a little magic happens: you use python to run pip directly from inside a locally lying file with its distribution. With this pip you put yourself on the local machine. About like Baron Munchausen, but it doesn't hurt.
You can also save a list of all installed packages on a computer with Internet into a text file, and then, removing the excess from it, download all these packages to a local directory, take them to an offline computer and install them there using the same pip
pip freeze > r.txt
pip download -r r.txt

M
milssky, 2020-06-23
@milssky

We find the necessary packages on https://pypi.org/ , download them from the Download files section and install them locally.

A
Alexander, 2020-06-23
@NeiroNx

Hands extract and copy to the desired folders.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question