Pycharm配置导入torch报错Traceback
报错内容
Traceback (most recent call last):
File “”, line 1, in
File “D:\PyCharm Community Edition 2021.2.2\plugins\python-ce\helpers\pydev_pydev_bundle\pydev_import_hook.py”, line 21, in do_import
module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named ‘torch’
报错截图
图片:
解决办法
File–>Settings
Python Interpreter
点击加号
搜索torch
选择下载install Package
在Python Console中再次导入torch显示True
问题解决
图片: