"Can not find torch package" solution

Open this:

Note Select python version.

Since entering the environment in a python command line mode after import torch is no problem, but pycharm in import torch there will be problems, so it should be pycharm in the wrong version of python.

Enter "where python" on the command line where you can get python path, so as to select the figure below can be friends!

 

ps: The first figure is a good thing. I found the interpreter and file-setting-project-project interpreter in a map of where the interpreter does not necessarily agree! Figure personally feel a more direct role in the current py to interpret the file. I Caishuxueqian now so think of.

Guess you like

Origin www.cnblogs.com/ljfl-study/p/11708613.html