Found existing installation: numpy 1.8.0rc1

   最近在学习机器学习,安装sklearn时却遇到了一个头疼的问题,安装环境  mac os 10.11.12

   pip install sklearn

错误如下:

Installing collected packages: numpy, scipy, scikit-learn, sklearn
  Found existing installation: numpy 1.8.0rc1
ERROR: Cannot uninstall 'numpy'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

百度后,说得最多的是关闭 MAC 的 SIP, 即

1. 点击Mac电脑的苹果图标 
2. 选择 重新启动 
3. 按住 command+R,直到进入还原模式 
4. 选择实用工具,然后点击 终端 
5. 输入 csrutil enable 按下回车 
6. 重启电脑

 然而,之后再安装,还是不行,加sudo安装也不行,  sudo pip install sklearn

折腾了一天,好在最后还是解决了,解决方法如下

    sudo pip install sklearn --ignore-installed six 

加上    --ignore-installed six 

安装成功,?

 

 

问题,由于我是先 关闭了SIP,故没验证是否需要关闭SIP,如有哪位同学也遇到了这个问题,麻烦先直接加  --ignore-installed six  测试下,再留言告知下,谢谢。

 

 

顺便推荐一个抢票软件,心到抢票?

C:\Users\032453>pip uninstall numpy Found existing installation: numpy 2.2.3 Uninstalling numpy-2.2.3: Would remove: d:\python3\lib\site-packages\numpy-2.2.3-cp312-cp312-win_amd64.whl d:\python3\lib\site-packages\numpy-2.2.3.dist-info\* d:\python3\lib\site-packages\numpy.libs\libscipy_openblas64_-43e11ff0749b8cbe0a615c9cf6737e0e.dll d:\python3\lib\site-packages\numpy.libs\msvcp140-263139962577ecda4cd9469ca360a746.dll d:\python3\lib\site-packages\numpy\* d:\python3\scripts\f2py.exe d:\python3\scripts\numpy-config.exe Proceed (Y/n)? y Successfully uninstalled numpy-2.2.3 C:\Users\032453>pip install numpy==1.21.6 Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple ERROR: Could not find a version that satisfies the requirement numpy==1.21.6 (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 1.13.3, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5, 1.20.0, 1.20.1, 1.20.2, 1.20.3, 1.21.0, 1.21.1, 1.22.0, 1.22.1, 1.22.2, 1.22.3, 1.22.4, 1.23.0, 1.23.1, 1.23.2, 1.23.3, 1.23.4, 1.23.5, 1.24.0, 1.24.1, 1.24.2, 1.24.3, 1.24.4, 1.25.0, 1.25.1, 1.25.2, 1.26.0, 1.26.1, 1.26.2, 1.26.3, 1.26.4, 2.0.0, 2.0.1, 2.0.2, 2.1.0rc1, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.2.0rc1, 2.2.0, 2.2.1, 2.2.2, 2.2.3) ERROR: No matching distribution found for numpy==1.21.6 为什么报错了 ?解决它
最新发布
03-14
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值