How to install packages on Pip without internet access?

Asked

Viewed 2,279 times

0

I’m having trouble with the python.

I am providing service to a banking company, however the network is very closed, I can not download the files via pip. I can download the packages in another way but I can’t get them to run, someone can help me?

Detail: only works the powershell

  • Try using Winpython, I believe that the installation of packages can be performed in one enviroment and transferred to another because it is something Portable. I hope it helps you.

  • then the machine that I use can not download absolutely anything, I kind of managed to do a hack on the network, but I think I will not be able to use winpython,

  • You can manually download the packages, unpack them and run the setup.py program individually (I think it’s "setup.py install"); the drawback of the approach is that you need to manually resolve the dependencies (like module A needs module B, so first install B).

  • You cannot directly install . whl(Whell)?

  • Tried to use the pip3 download -r Requirements.txt and take a USB stick with these? And perform an offline installation.

  • So I can’t open it in files. whl, and tbm can not carry a USB stick because windows recognizes that it is not a peripheral and blocks, and pip3 does not recognize the term kkkk( to laughing but to crying inside)

Show 1 more comment

1 answer

2

To install a file .whl locally, use pip install normally:

pip install arquivo.whl
pip install C:\Pasta\arquivo.whl

If you have dependencies, you can specify a folder to search for dependencies:

pip install --no-index --find-links c:\Pasta programa

If it is in format .tar.gz or .zip, unpack and search for the setup.py - if you have, turn the easy_install:

easy_install --always-unzip --allow-hosts=None --find-links=c:\pasta

It will look for the dependencies in C:\Pasta, put all the files he asks there.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.