- mac pro 更新numpy出现异常:Uninstalling
- PyCharm pro for Mac(Python语言开发环境
- Final Cut Pro X for Mac(视频剪辑软件)
- Uninstalling GoodSync on Mac
- office 365 for mac 永久激活版 (附offic
- Adobe Premiere Pro 2020 Mac永久版上线
- Details: message: Could not run
- Surface Pro6 黑苹果镜像 macOS Mojave
- Mac 电脑打开App Store 一片空白
- Mac多轨音频编辑器那个好用?Amadeus Pro有什么优点?
问题描述
发现缺少模块,或者某模块更新需要更高版本的numpy,更新numpy的时候出现异常:
Found existing installation: numpy 1.8.0rc1
DEPRECATION: Uninstalling a distutils installed project (numpy) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
试过别人提供的教程,什么关闭sip,都试过不好使。
解决方案
后来我就用最暴力的办法直接删除numpy文件夹,然后重新安装即可。
第一步,寻找numpy的路径。

看图就很清楚了,输入
python
,进入python命令行,然后直接输入import numpy
,最后直接打印路径即可print numpy.__path__
第二步,删除文件
# 删除numpy文件夹和安装信息
# 系统的话应该是在 /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
sudo rm -rf /Library/Python/2.7/site-packages/numpy # 该路径是第一步打印出来的路径
sudo rm -rf /Library/Python/2.7/site-packages/numpy.egg-info # 自带的会有这个东西
# 如果是自己安装过了的
# sudo rm -rf /Library/Python/2.7/site-packages/numpy-1.14.5.dist-info
把上面的都删除你就可以愉快地重新安装numpy了,系统其它模块卸载也是类似。
网友评论