Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install Pytorch offline?

Tags:

python

pytorch

I need to install Pytorch on a computer with no internet connection.

I've tried finding information about this online but can't find a single piece of documentation.

Do you know how I can do this? Is it even possible?

like image 278
Tom Avatar asked Oct 28 '25 01:10

Tom


1 Answers

An easy way with pip:

  • Create an empty folder
  • pip download torch using the connected computer. You'll get the pytorch package and all its dependencies.
  • Copy the folder to the offline computer. You must be using the same python setup on both computers (this goes for virtual environments as well)
  • pip install * on the offline computer, in the copied folder. This installs all the packages in the correct order. You can then use pytorch.

Note that this works for (almost) any kind of python package.

like image 196
ma3oun Avatar answered Oct 30 '25 17:10

ma3oun



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!