ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory:【已解决】

93 篇文章 4 订阅
7 篇文章 0 订阅

问题描述

使用pip安装matplotlib时候报错如下:

(cat) PS E:\matlab> pip install matplotlib
Collecting matplotlib
  Downloading matplotlib-3.5.3-cp37-cp37m-win_amd64.whl (7.2 MB)
     ---------------------------------------- 7.2/7.2 MB 747.3 kB/s eta 0:00:00
Collecting fonttools>=4.22.0
  Downloading fonttools-4.38.0-py3-none-any.whl (965 kB)
     ---------------------------------------- 965.4/965.4 kB 1.1 MB/s eta 0:00:00
Requirement already satisfied: packaging>=20.0 in d:\program\anaconda3\envs\cat\lib\site-packages (from matplotlib) (21.3)
Requirement already satisfied: pillow>=6.2.0 in d:\program\anaconda3\envs\cat\lib\site-packages (from matplotlib) (8.2.0)
Requirement already satisfied: python-dateutil>=2.7 in d:\program\anaconda3\envs\cat\lib\site-packages (from matplotlib) (2.8.1)
Requirement already satisfied: numpy>=1.17 in d:\program\anaconda3\envs\cat\lib\site-packages (from matplotlib) (1.21.6)
Requirement already satisfied: kiwisolver>=1.0.1 in d:\program\anaconda3\envs\cat\lib\site-packages (from matplotlib) (1.3.1)
Requirement already satisfied: cycler>=0.10 in d:\program\anaconda3\envs\cat\lib\site-packages (from matplotlib) (0.10.0)
Requirement already satisfied: pyparsing>=2.2.1 in d:\program\anaconda3\envs\cat\lib\site-packages (from matplotlib) (2.4.7)
Collecting six
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'd:\\program\\anaconda3\\envs\\cat\\lib\\site-packages\\numpy-1.21.6.dist-info\\METADATA'

(cat) PS E:\matlab> 

解决方案 

 简单粗暴一点,直接删除numpy和numpy-1.21.6.dist-info这两个文件夹,然后重新安装numpy就可以了。

pip install numpy。

后面的这个错误,也是一样的解决方案,根据提供的路径,找到相应的文件夹,然后删除,再使用pip安装就好。

(cat) PS E:\matlab> pip install pandas
Requirement already satisfied: pandas in d:\program\anaconda3\envs\cat\lib\site-packages (1.2.4)
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'd:\\program\\anaconda3\\envs\\cat\\lib\\site-packages\\pandas-1.2.4.dist-info\\METADATA'

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ACMSunny

赠人玫瑰,手有余香。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值