简体   繁体   中英

How do I install Pytorch offline?

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?

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.

Download source of pytorch from https://github.com/pytorch/pytorch

Then follow the tutorial named: Install PyTorch

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM