如何解决ModuleNotFoundError: No module named 'torch'

运行Pycharm时出现ModuleNotFoundError: No module named 'torch',通过命令行pip install 。没有用啊,要怎么安装呢?

pycharm中import torch显示No module named 'torch' - 知乎 有时,利用PyCharm会出现以下错误, Traceback (most recent call last): File "/Users/c/PycharmProjects/uaasaadad/hhhh.py", line 1, in <module> import torch ModuleNotFoundError: No module … https://zhuanlan.zhihu.com/p/169919348

试试下面的看看

pip3 install torch -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com