Is it possible to use Pytorch without GPU support?

Hi as the question suggest, is it possible to use Pytorch without GPU support. I was using Pytorch without GPU in Google Cloud, and it complained about no finding supporting CUDA library. In pytorch.org website, there is an option to install Pytorch without CUDA support. I believe the command is :

conda install pytorch torchvision -c soumith

Is this a relevant command to run Pytorch solely using CPU.

Thanks

  • Yes, that would be correct.
  • PyTorch can be used without GPU (solely on CPU).
  • And the above command installs a CPU-only compatible binary.

Hi,

I tried “conda install pytorch torchvision -c soumith”
Bt am getting an error “ModuleNotFoundError: No module named ‘torchvision.ops’”
Any solutions?

The soumith channel was used in old PyTorch releases, so you should stick to the pytorch or pytorch-nightly channels as given in the install commands.

@ptrblck Sir I am trying to install pytorch in my desktop thats without GPU facility.
I have installed anaconda and tried through Command prompt using

conda install pytorch torchvision torchaudio cpuonly -c pytorch

I think its installed as I am getting : All requested packages already installed.

but when I am using to import it through spyder its giving error:
[WinError 126] The specified module could not be found. Error loading “C:\ProgramData\Anaconda3\lib\site-packages\torch\lib\asmjit.dll” or one of its dependencies.

This thread might be generally useful and in particular you could post there after running this.

!pip install pytorch torchvision for Jupyter users