today ,I update the version of annaconda, when I want to install the pytorch, I find i can't do that .
the only reason is the version of conda.
I update conda from 4.5.11 to 4.9.1
by look up the mess in network ,i find this :
conda --version //which you can find the version of conda
conda list -r //you can find the all version of conda
conda install --rev x //you can back the version to rev x
i follow it and success.
after that , i continue to install pytorch ,it told me that you must make your min version is 3.9 of your annaconda...???
so the result is i failed
and , i delect the annaconda3 , and install it.
and then ,i success install pytorch by comman :conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
enter the environment of python: import torch
x= torch.rand(5,3)
print(x)
the terminal back info to me is :
tensor([[0.3688, 0.3780, 0.3610],
[0.3431, 0.2866, 0.9031],
[0.4181, 0.5208, 0.1581],
[0.7746, 0.9418, 0.8661],
[0.0627, 0.3664, 0.5111]])
when i input:torch.cuda.is_available()
my cuda is failed for back:return torch._C._cuda_getDeviceCount() > 0
my english is bad, but it is only one language and one tool.
just use it is good for me.
2020/11/08 today ,i open up the ubuntu and terminal,it show me "ModuleNotFoundError: No module named 'conda'"
i don't know what happened .look up the answer
and bash the sh file -u reinstall it
solved.