【安装填坑】---- ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory:

用anaconda 安装python开发环境的时候,使用pip安装某些包,会弹出如下这种提示

ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'd:\users\xxxx\appdata\local\continuum\anaconda3\envs\faiss\lib\site-packages\numpy-1.20.3.dist-info\METADATA’
除了要修改注册表HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystemLongPathsEnabled值由0变1


参考:ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: ‘c:\users


还可能是你这个安装环境里对应的安装包里已经有了其它版本的文件夹,如果是的话就把其它版本的对应文件夹里的内容拷到错误提示里的路径下就可以了,比如我这次系统提示没有numpy-1.20.3.dist-info\METADATA文件,我进入我的安装路径下发现已经有个1.20.2版本的文件了,所以就直接把1.20.2版本的文件拷到了1.20.3的路径下,再次安装fasttext,提示成功。
在这里插入图片描述


参考2:Could not install packages due to an EnvironmentError: [Errno 2] numpy-1.20.1.dist-infor \METADATA


Guess you like

Origin blog.csdn.net/jackhh1/article/details/117948900