Error happend when import torch (pytorch)

Viewed 375

Try to use pytorch, when I do

import torch

---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-2-eb42ca6e4af3> in <module>
----> 1 import torch

C:\Big_Data_app\Anaconda3\lib\site-packages\torch\__init__.py in <module>
    124                 err = ctypes.WinError(last_error)
    125                 err.strerror += f' Error loading "{dll}" or one of its dependencies.'
--> 126                 raise err
    127             elif res is not None:
    128                 is_loaded = True

OSError: [WinError 182] <no description> Error loading "C:\Big_Data_app\Anaconda3\lib\site-packages\torch\lib\shm.dll" or one of its dependencies.

Not sure what happend.

The truth is, I installed pytorch around the end of last year.(I think) I don't remember how, I installed it because I want try to use it.

But I guess I never used it after I installed. don't remember running some script with pytorch.

And now I start to use it, get this error. Have no clue What I should check first.

That means, I don't know what module, framework, driver, app are related with pytorch.

So I don't know where to beginning, check is there any other module might cause this Error.

If anyone knows how to solve this. Or where to start the problem checking. Please let me know.

Thank you.

My pytorch version is 1.11.0 OS: window 10

2 Answers

I solved the problem. Just reinstall your Anaconda.

!!Warning!!: you will lose your lib.

Referring solution: Problem with Torch 1.11

The version may not be exactly as same as yours, but maybe this question asked on 2020-09-04 helps.

Related