I’m struggling to get the fastai module to work on Spyder. I’ve followed the instructions in this thread and created a separate environment using conda, but when I run spyder in this environment and try to import the fastai library, I get this error:
import fastai
Traceback (most recent call last):
File “”, line 1, in
import fastai
File “C:\Users\User\Anaconda3\lib\site-packages\fastai_init_.py”, line 1, in
from .basic_train import *
File “C:\Users\User\Anaconda3\lib\site-packages\fastai\basic_train.py”, line 2, in
from .torch_core import *
File “C:\Users\User\Anaconda3\lib\site-packages\fastai\torch_core.py”, line 2, in
from .imports.torch import *
File “C:\Users\User\Anaconda3\lib\site-packages\fastai\imports_init_.py”, line 2, in
from .torch import *
File “C:\Users\User\Anaconda3\lib\site-packages\fastai\imports\torch.py”, line 3, in
from torch import nn, optim, as_tensor
ImportError: cannot import name ‘as_tensor’
I’m assuming its because I’ve got an incompatible version of one of the packages but I’m not adept with anaconda prompt, and have no idea how to downgrade packages if that’s whats needed.
Which packages are wrong and how do I fix them using conda?