Installing PyTorch results in an older version

I’m trying to update PyTorch on a Conda environment on a remote machine. I enter:

conda install pytorch torchvision -c pytorch

The current stable version is 1.5.1 but above command installs 1.4.0. I was wondering what is the issue and how to fix it.

conda install pytorch=1.5.1 torchvision=0.6.1 -c pytorch

I tried that and I received the following message:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: /
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
Examining conflict for tensorboard tensorflow-estimator tensorflow-base grpcio tensorflow absl-py: 2%|▏ | 2/98 [00:05<04:22, 2.74sExamining conflict for tensorboard tensorflow-estimator tensorflow-base grpcio tensorflow absl-py: 3%|▎ | 3/98 [00:05<03:08, 1.99s

and it continued on and on.

What version of Python does your anaconda have? I am on 3.7.7 and (in the past) when I used the command you posted, the farthest I could get to was PyTorch 1.3.1 and torchvision 0.4.2. I manually upgraded the modules using the command I posted. However, in the interest of your conda environment stability, I’d just create a new environment and install libraries as needed.

Hi,

This is most likely due to either an old version of conda that does not support latest pytorch (you just need to update conda in that case). Or other packages that have dependencies that conflict with the latest version of pytorch.

As @harsha_g suggested, I would try to install it in a new environment to make sure it is not due to conflict with other libs.

@harsha_g @albanD That makes sense. Thank you both!