torch circular import AttributeError

261 views Asked by At

I am trying to use a script that uses torch but I keep getting this Attribute Error:

AttributeError: partially initialized module 'torch' has no attribute 'Tensor' (most likely due to a circular import)

I have tried running

pip3 uninstall torch
pip3 uninstall torchvision
pip3 uninstall torchaudio
pip3 install torch
pip3 install torchvision
pip3 install torchaudio

But this has not worked for me. Does anybody know how I can fix this? Any help would be greatly greatly appreciated!

0

There are 0 answers