安装torchsummaryX时出现ERROR: Could not install packages due to an OSError: [Errno 2] No such file ……\\site-packages\\numpy-1.21.2.dist-info\\METADATA'
执行如下命令:
pip install torchsummaryX
报错如下:
Requirement already satisfied: numpy in c:\users\cdb\.conda\envs\pytorch\lib\site-packages (from torchsummaryX) (1.21.2)
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'c:\\users\\cdb\\.conda\\envs\\pytorch\\lib\\site-packages\\numpy-1.21.2.dist-info\\METADATA
出现这种情况的原因很可能是因为环境移植(env clone)时出现的异常情况。
解决方法:
-
打开路径:此路径与异常提示中路径是一样的。 c:\users\cdb\.conda\envs\pytorch\lib\site-packages\numpy-1.21.2.dist-info\METADATA’” -
然后将“numpy-1.21.2.dist-info”文件夹删除。 -
从新在安装环境下输入安装命令:pip install torchsummaryX
参考链接: https://blog.csdn.net/fy_2018/article/details/108859408
|