0

I have 2 machines, machine A with internet connection installed with python, pip and all libraries needed for developement.

On Machine B, there is no internet connection. I can download the installer and perform python installation.

Is there a way for me all libraries in machine A to machine B, so i don't have to research the offline packages/jar files and install/import to machine B?

guo
  • 121
  • 3
  • 11
  • This thread may help: https://stackoverflow.com/questions/11033753/transfer-python-setup-across-different-pc – ddejohn Feb 16 '21 at 06:56
  • Note first that the first solution mentioned on the above thread won't work for you. That solution just makes a list of the packages to be installed by pip. Installing on the second machine still has pip pulling the packages from the internet. Another thing you can try that i didn't see listed as an answer is that you can have pip install packages into a local directory so your project can be stand-alone. I think this option is `-t`. So you can create a package list with `freeze`, then install to a local dir with `-t`, and then copy that directory to your other machine. – CryptoFool Feb 16 '21 at 07:10
  • @CryptoFool can you explain more? and give me sample full command? – guo Feb 16 '21 at 07:34
  • can i just copy C:\Users\jyiyn\AppData\Roaming\Python\Python39 to new machine? if i just need to paste or run any command to import them? – guo Feb 16 '21 at 07:40
  • Does this answer your question? [How to create a common environment for teamwork in Python](https://stackoverflow.com/questions/64258494/how-to-create-a-common-environment-for-teamwork-in-python) Especially: https://stackoverflow.com/a/64269082/3820025 – Bence Kaulics Feb 17 '21 at 14:38
  • Nope. The work environment is very strict. I tried to copy the virtualenv at Internet machine then paste to the non-internet machine. The antivirus protection refused to paste it due to all the. py files. – guo Feb 19 '21 at 08:30
  • I need a solution copied them and install offline. I cannot copy over the extracted files. – guo Feb 19 '21 at 08:30

0 Answers0