How can I install NUMPY on Python 3.7 without Internet on your computer?
Answer 1, Authority 100%
I did not set specifically numpy
, but the point is similar.
- You need to download the package itself on the https://pypi.org/ , find it through the search.
- NUMPY there is a WHL package, therefore will first need to install
WHEEL
. Find it on Pypi.org and download the .tar.gz file. Install it with a simplePIP Install command Full_PU_DE_Ini_File
in the console, more described how to make it Official website . If you give an error, you will need to see what packages is not enough, it will be indicated in an error. Pay them and install them in the same way. - thus set first
Wheel
, thenNUMPY
. But all incoming packages will need to be downloaded one.
I advise you to put them all together in one folder to change only the name of the package and not change the path.
Answer 2, Authority 25%
pip allows you to download Packages with all dependencies and after installing them locally.
Thus, to transfer a package with all dependencies from the online machine (with Python installed) on the machine without access to the Internet follows:
-
make sure that the version
python
on both machines coincides,python --version
-
Create a directory for the necessary packages:
mkdir dist CD Dist
-
Download Packages:
pip download & lt; package name & gt;
-
transfer directory on offline machine using any media,
-
Set the dependencies from LAN :
pip install --no-index --find-links = / path / to / dist_directory
The situation is complicated if the online machine and the target machine have different versions of Python
or OS
In the case of different versions of Python
you can create a separate venv
and Specify the desired version before starting downloading.
A more complex option that is exactly for sure if online and target machines have different OS:
- Download packages on the online machine with
PIP download
, - Find among the downloaded packages those in the name of which clearly contains the version
python
and \ orOS
. For example: NUMPY-1.18.1-CP36-CP36M-WIN32
.whl, - Find in the repository pypi packages that have binding to version and download them,
- Create downloaded packages in the
Dist
, - Continue with 4 points of the previous instruction.