Python – 安装onnxruntime-gpu出现ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: ‘…\\numpy-1.23.1.dist-info\\METADATA’
1 Python安装onnxruntime-gpu出错
今天在Anaconda中的虚拟环境中使用
pip install onnxruntime-gpu
安装onnxruntime的gpu版本库时出现了如下的错误
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'd:\\anaconda\\envs\\vac_cslr\\lib\\site-packages\\numpy-1.23.1.dist-info\\METADATA'
解决方法
这里可能是你的Anaconda的虚拟环境下有多个numpy文件夹,比如上文中我的虚拟环境vac_cslr的路径d:\\anaconda\\envs\\vac_cslr\\lib\\site-packages就有多个numpy-******类似的文件夹,如
![Python – 安装onnxruntime-gpu出现ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: ‘…\\numpy-1.23.1.dist-info\\METADATA’-StubbornHuang Blog](https://www.stubbornhuang.com/wp-content/uploads/2022/11/wp_editor_md_a6c94ab3d915e2a9232f2fd7b2f45bd3.jpg)
上述错误提示是说d:\\anaconda\\envs\\vac_cslr\\lib\\site-packages\\numpy-1.23.1.dist-info\\METADATA这个路径下没有METADATA文件,我们只需要看numpy-1.22.4.dist-info或者numpy-1.21.5.dist-info这两个文件夹中哪个有METADATA文件,然后拷贝到numpy-1.23.1.dist-info文件夹下即可,然后重新运行pip install onnxruntime-gpu即可安装成功!
本文作者:StubbornHuang
版权声明:本文为站长原创文章,如果转载请注明原文链接!
原文标题:Python – 安装onnxruntime-gpu出现ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: ‘…\\numpy-1.23.1.dist-info\\METADATA’
原文链接:https://www.stubbornhuang.com/2426/
发布于:2022年11月29日 14:15:26
修改于:2023年06月21日 17:49:04
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
评论
70