Pycharm配置导入torch报错Traceback

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’

报错截图

图片: Pycharm配置导入torch报错Traceback

解决办法

File–>Settings
Pycharm配置导入torch报错Traceback
Python Interpreter
Pycharm配置导入torch报错Traceback
点击加号
Pycharm配置导入torch报错Traceback搜索torch
Pycharm配置导入torch报错Traceback选择下载install Package
Pycharm配置导入torch报错Traceback
在Python Console中再次导入torch显示True
Pycharm配置导入torch报错Traceback

问题解决

图片:Pycharm配置导入torch报错Traceback

上一篇:第1篇文章 测试一下


下一篇:关于使用Aptana+Pydev构建Python开发环境的更新(Django)