anaconda安装pytorch后import出错 ImportError: numpy.core.multiarray failed to import

可能是安装的numpy不对。。
在一番折腾(反复安装卸载pytorch)后发现没有用,于是乎:
最终:卸载原来anaconda中的numpy (pip uninstall numpy),然后重新安装numpy(pip install numpy),但是又提示有错误:
torch 1.7.0 requires dataclasses, which is not installed.
于是又pip install dataclasses,成功!

你可能感兴趣的:(电脑知识,python)