Unable to update PyTorch 1.4.0 to 1.5.0 using Conda
When I tried to udpdate PyTorch from 1.4.0 to 1.5.0, Anaconda says that all the packages are already installed.

$ conda install -c pytorch pytorch torchvision

Collecting package metadata (current_repodata.json): done
Solving environment: done

# All requested packages already installed.


$ conda list | grep -i torch

_pytorch_select           0.2                       gpu_0  
pytorch                   1.4.0           py3.7_cuda10.0.130_cudnn7.6.3_0    pytorch
torchvision               0.5.0                py37_cu100    pytorch


I believe 1.5.0 is available in the pytorch channel

$ conda search -c pytorch pytorch=1.5.0

Loading channels: done
# Name                       Version           Build  Channel             
pytorch                        1.5.0     py3.5_cpu_0  pytorch             
pytorch                        1.5.0 py3.5_cuda10.1.243_cudnn7.6.3_0  pytorch             
pytorch                        1.5.0 py3.5_cuda10.2.89_cudnn7.6.5_0  pytorch             
pytorch                        1.5.0 py3.5_cuda9.2.148_cudnn7.6.3_0  pytorch             
pytorch                        1.5.0     py3.6_cpu_0  pytorch             
pytorch                        1.5.0 py3.6_cuda10.1.243_cudnn7.6.3_0  pytorch             
pytorch                        1.5.0 py3.6_cuda10.2.89_cudnn7.6.5_0  pytorch             
pytorch                        1.5.0 py3.6_cuda9.2.148_cudnn7.6.3_0  pytorch             
pytorch                        1.5.0     py3.7_cpu_0  pytorch             
pytorch                        1.5.0 py3.7_cuda10.1.243_cudnn7.6.3_0  pytorch             
pytorch                        1.5.0 py3.7_cuda10.2.89_cudnn7.6.5_0  pytorch             
pytorch                        1.5.0 py3.7_cuda9.2.148_cudnn7.6.3_0  pytorch             
pytorch                        1.5.0     py3.8_cpu_0  pytorch             
pytorch                        1.5.0 py3.8_cuda10.1.243_cudnn7.6.3_0  pytorch             
pytorch                        1.5.0 py3.8_cuda10.2.89_cudnn7.6.5_0  pytorch             
pytorch                        1.5.0 py3.8_cuda9.2.148_cudnn7.6.3_0  pytorch    


Why is conda not updating PyTorch to 1.5.0?

Using Python 3.7.3 &amp; conda 4.8.3 on Ubuntu 18.04

Thanks!

Install Validates Constraints

The Conda install first checks to see if a constraint is satisfied, rather than blindly trying to install the latest of everything. A better reading of the command:

conda install -c pytorch pytorch torchvision


would be


  With the pytorch channel prioritized, ensure that the currently activated environment has some version of pytorch and torchvision installed.


Your environment already satisfies this constraint, so there is nothing to do.

Updating Packages, or Constraints

If you want to update a package, then look into the conda update command or, if you know a minimum version you require, then specify it:

conda install -c pytorch pytorch[version='&gt;=1.5'] torchvision


which effectively changes the constraint.

Better Practice (Recommended)

Best practice though is to simply make a new env when you require changes to packages. Every time one changes the packages in an env, one risks breaking/invalidating existing code.

conda create -n pytorch_1_5 -c pytorch pytorch torchvison


And this will grab the latest possible versions by default.
