Failed instalation with pip3 for torchvision

I am installing pytorch with pip3. I am using the commands from the website:

pip3 install
pip3 install torchvision

The first one works perfectly and installs pytorch. The second one, however, gives:

Collecting torchvision
  Using cached torchvision-0.2.0-py2.py3-none-any.whl
Collecting numpy (from torchvision)
  Using cached numpy-1.14.0-cp35-cp35m-manylinux1_x86_64.whl
Collecting six (from torchvision)
  Using cached six-1.11.0-py2.py3-none-any.whl
Collecting pillow>=4.1.1 (from torchvision)
  Using cached Pillow-5.0.0-cp35-cp35m-manylinux1_x86_64.whl
Collecting torch (from torchvision)
  Using cached torch-0.1.2.post1.tar.gz
    Complete output from command python egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-dxvvgs_4/torch/", line 11, in <module>
        raise RuntimeError(README)
    RuntimeError: PyTorch does not currently provide packages for PyPI (see status at
    Please follow the instructions at to install with miniconda instead.
Command "python egg_info" failed with error code 1 in /tmp/pip-build-dxvvgs_4/torch/
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

The problem is I do not want to use anaconda, I just want a regular pip3 installation. I remember stumbling across this error some time ago, and I somehow managed to overcome it, but I really don’t remember how.

Your pip is finding the old 0.1.2 torch version. Try the --no-cache-dir option (

pip3 install --no-cache-dir torchvision

gives the same result.

Hmm, upon second thought, cache probably doesn’t matter. Could you check if torch is properly installed? The torch prerequisite should already be satisfied.

I can import torch and use it, yes.

Pip’s tendency to (re)install dependencies already installed tends to be greater than my own. If you feel similar, you could use --no-deps when installing torchvision.
Installing torchvision from github may also be a good alternative, it is far easier than for torch. See .

Best regards




ran pip3 install with --no-deps and

Collecting torchvision
  Using cached torchvision-0.2.0-py2.py3-none-any.whl
Installing collected packages: torchvision
Successfully installed torchvision-0.2.0

Hah, that was strange. Thanks :slight_smile:


pip install torchvision --no-deps worked for me too.

Driver Version: 390.42
CUDA 9.1
CudNN 7.1


Haha that was strange (2). I was wandering for about 30 minutes… thanks :slight_smile:

This solution pip install torchvision --no-deps also worked for me. And I found this:
Collecting torchvision
Using cached
Installing collected packages: torchvision
Successfully installed torchvision-0.2.1