It's not a code question, basically I haven't been able to find anything similar to this.
I did a development in Python that I have to run on a desktop computer, but the problem is that this computer does not have an internet connection and I need to have the Pandas package installed. Is it possible to install Pandas without having internet, carrying it downloaded on a flash drive for example?
The most direct option is to download the .whl files from PyPI (Python Package Index) and install them with pip.
To do this, download the whl of all Pandas dependencies, which I think are:
And of course Pandas .
For each package, you download the appropriate whl for the operating system (including whether it is 32 or 64 bits) and the version of Python in which you are going to install. Later you use pip but pointing to the whl file path. You install the dependencies first and Pandas last, for example (for Windows, Python 3.6, 64 bits, with the whl in the path E:/Downloads ):
py -3.6 -m pip install E:/Descargas/pytz-2017.2-py2.py3-none-any.whl
py -3.6 -m pip install E:/Descargas/python_dateutil-2.6.1-py2.py3-none-any.whl
py -3.6 -m pip install E:/Descargas/numpy-1.13.1-cp36-none-win_amd64.whl
py -3.6 -m pip install E:/Descargas/pandas-0.20.3-cp36-cp36m-win_amd64.whl
If it is for Windows and you have compilation problems you can use the precompiled binaries provided by Christoph Gohlke from the University of California instead of the PyPI whl ones:
http://www.lfd.uci.edu/~gohlke/pythonlibs/
The procedure is the same.
You will generally find the whl file for almost every package distributed on PyPi, however you may come across some that are only available through the sources. These are found in compressed files of the zip or tar.gz type .
Installation with pip :
They are installed with pip using the argument
-e
followed by the path of the directory where the uncompressed file is located:Using the setup.py file :
We install using the setup.py file found in that file:
A somewhat less manual option is to build our own directory with everything we need using
pip wheel
, in the terminal on a connected PC we do:This creates a directory in
D:/Descargas/
(change to the necessary path) with everything needed to install Pandas (dependencies included). We can copy it like this or compress it first. We copy this to the offline computer (as an example it is usedD:/Descargas/
as a path) and execute in the terminal:Another option would be to use Anaconda which has Pandas among the libraries included in the installer among many others (around 100 as can be seen in the following list ).