python - 无法在默认的 mac python 设置中更新 numpy
问题描述
我的设置:MacOS 10.12.3 默认 mac python 版本:2.7.10 默认 mac python numpy 版本:1.8
我想运行一个需要 numpy >1.9 的程序。我以为这很简单……但结果却很痛苦。我已经根据我发现的旧线程尝试过的事情......没有任何
成功:pip install numpy
,,,。pip install --ignore-installed numpy
pip install numpy --upgrade
pip install --user -U numpy
我没有设法运行的是卸载默认的numpy,然后重新安装新的(使用pip uninstall numpy
)。我得到了(即使使用 sudo):
Exception: Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 246, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/uninstall.py", line
70, in run
requirement_set.uninstall(auto_confirm=options.yes)
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 274, in uninstall
req.uninstall(auto_confirm=auto_confirm)
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 730, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 126, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 292, in renames
shutil.move(old, new)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py",
line 302, in move
copy2(src, real_dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py",
line 131, in copy2
copystat(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py",
line 103, in copystat
os.chflags(dst, st.st_flags) **OSError: [Errno 1] Operation not permitted:
'/tmp/pip-g1dBU9-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy-1.8.0rc1-py2.7.egg-info'**
我确实设法获得了自制python3并让程序在终端中运行,但它的GUI版本是在另一个调用默认python2.7的程序(imageJ)中实现的,自然会失败。
有任何想法吗?
解决方案
推荐阅读
- r - 如何重命名拆分直方图中的拆分变量?
- javascript - 如何创建函数以对列表中的 args 进行排序
- java - 当我在应用程序中实现 barteksc 时,我的应用程序崩溃了
- apache - 如何禁止使用 apache 请求特定目录的 IP 地址
- javascript - 上传图片后在本机中获取downloadURL
- python - Python如何避免“副作用”
- apache - 错误:Apache 意外关闭。[阿帕奇,xampp,phpmyadmin]
- javascript - 查询用户输入 - API
- macos - 在 Xamarin Forms 应用程序中构建路径 iOS v MacOs 的问题
- sql - Rails 更新后查询中断。Arel::Visitors::UnsupportedVisitError。改为构造一个 Arel 节点