Closed IlsaCooke closed 4 years ago
Could you try removing torch and torchvision via pip, and reinstall with conda?
So:
pip remove torch torchvision
followed by:
conda install pytorch torchvision cudatoolkit=10.2 -c pytorch
I suspect pip
doesn't install/link the required libraries properly, and it's up to conda
to do so...
This didn't fix it but from digging around on the Pytorch site I found this solution:
conda install pytorch torchvision cpuonly -c pytorch
https://discuss.pytorch.org/t/cannot-import-torch-on-jupyter-notebook/79334/2
Hey hey,
I am interesting in trying out your new deep learning functionality.
I ran a pull and installed the new version of pyspectools but I am unable to import SpecConstants or MoleculeDetective
This seems to be due to an issue with the install of Pytorch on Windows with Anaconda3. I wasn't able to install the pyspectools update without install Pyspectools myself first via: pip install torch===1.5.0 torchvision===0.6.0 -f https://download.pytorch.org/whl/torch_stable.html
After this the pyspectools install worked fine but if I try to run "import torch" I get the following error:
File "C:\Users\Ilsa Cooke\Documents\Python Scripts\untitled0.py", line 7, in
import torch
File "C:\anaconda\lib\site-packages\torch__init__.py", line 81, in
ctypes.CDLL(dll)
File "C:\anaconda\lib\ctypes__init.py", line 364, in init__ self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
Any ideas?