Pytorch gets installed twice?

I tried to install pytorch following the commands suggested in the homepage.

My preferences:

OS -- Linux
Package Manager -- pip
Python -- 3.5
CUDA -- 9.1

The suggested commands:

pip3 install 
pip3 install torchvision

So i install pytorch and then go to install the torchvision. However, as one of it’s dependency, torchvision starts installing pytorch again. Here are snippets from command line:

$ pip3 install --user
Collecting torch==0.4.0 from
$ pip3 install --user torchvision
Collecting torch (from torchvision)
  Using cached

I noticed above that when installing torchvision, it seems downloading another whl of pytorch. So I checked the actual module files (~/.local/lib/python3.5/site-packages/torch/ and found the latter installation (cuda = ‘8.0.61’) had overwritten the previous one (cuda = ‘9.1.85’).

Doesn’t really make sense to me – is this expected? Shall I reinstall the pytorch again(to be sure I got the correct version)? Thanks!

Probably this:

Best regards


Hi Thomas,

Thanks very much for the suggestion.

Btw, I wonder why the homepage do not suggest installation commands like this (I mean, with --no-deps option)? Otherwise, it might let people actually install another version of pytorch without awareness.