The PyTorch installation web page shows how to install the GPU and CPU versions of PyTorch:
conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
and
conda install pytorch torchvision cpuonly -c pytorch
Can both version be installed in the same Conda environment?
In case you might ask why would this be needed, it's because I would like a single Conda environment which I can use on computers which have a GPU and those which don't.