Installing pytorch with conda
You seem to have installed PyTorch in your base environment, you therefore cannot use it from your other "pytorch" env.
Either:
directly create a new environment (let's call it pytorch_env) with PyTorch: conda create -n pytorch_env -c pytorch pytorch torchvision
switch to the pytorch environment you have already created with: source activate pytorch_env and then install PyTorch in it: conda install -c pytorch pytorch torchvision
I've just been trying to dabble in AI in the past few weeks, I've tried installing pytorch with conda and it all seems to work but then I get the error:
ImportError: /home/lp35791/.local/lib/python3.8/site-packages/torch/lib/libtorch_cuda.so: cannot read file data
I've been trawling through the web but can't seem to find the answer to this error. I've uninstalled and reinstalled anaconda and when I made a new environment and installed numpy along with pytorch, numpy imported successfully but pytorch did not. I'm just wondering what the problem is. Any help would be greatly appreciated!