Vyuh

Finite State Magic

Installing pytorch inside pipenv

Last Modified on May 8, 2020

Tags: pipenv pytorch python install

If you wish to install torch and torchvision under pipenv. then the method suggested for pip at PyTorch Website might not work for you.

You can try to download the required wheel files manually from pytorch wheel file index and install them with pipenv install command.

I downloaded torch 1.3.0 and torchvision 0.4.1 wheel files using wget. These files were suitable for my requirements, they do not support CUDA, they work with python 3.6, and, they work on 64 bit linux. This is indicated by the file name suffix cpu-cp36-cp36m-linux_x86_64 on them. Essentially, the following commands worked for me.

mkdir -p ml/pytorch
cd ml/pytorch
wget $torch_wheel_url $torch_vision_wheel_url
pipenv install --skip-lock *.whl