mac下用pip 安装软件出现错误Operation not permitted
2017-10-11 21:29
501 查看
在mac上用pip 安装keras时出现 如下错误:
解决方法:
➜ ~ sudo pip install keras The directory '/Users/zhangxin/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/Users/zhangxin/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting keras Downloading Keras-2.0.8-py2.py3-none-any.whl (276kB) 100% |████████████████████████████████| 276kB 465kB/s Requirement already satisfied: pyyaml in /Library/Python/2.7/site-packages (from keras) Collecting six>=1.9.0 (from keras) Downloading six-1.11.0-py2.py3-none-any.whl Collecting scipy>=0.14 (from keras) Downloading scipy-0.19.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (16.2MB) 100% |████████████████████████████████| 16.2MB 66kB/s Collecting numpy>=1.9.1 (from keras) Downloading numpy-1.13.3-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (4.6MB) 100% |████████████████████████████████| 4.6MB 189kB/s Installing collected packages: six, numpy, scipy, keras Found existing installation: six 1.4.1 DEPRECATION: Uninstalling a distutils installed project (six) 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. Uninstalling six-1.4.1: Exception: Traceback (most recent call last): File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run prefix=options.prefix_path, File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 778, in install requirement.uninstall(auto_confirm=True) File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 754, in uninstall paths_to_remove.remove(auto_confirm) File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove renames(path, new_path) File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/__init__.py", line 267, 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-UxHbJe-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
解决方法:
# 基于用户的权限来安装模块包。 pip install keras --user -U
相关文章推荐
- macosx 10.11 python pip install 出现错误OSError: [Errno 1] Operation not permitted:
- macosx 10.11 python pip install 出现错误OSError: [Errno 1] Operation not permitted:
- 【Python学习笔记】macosx 10.11 python pip install 出现错误OSError: [Errno 1] Operation not permitted:
- Mac pip安装模块出现错误
- 虚拟机安装完MAC苹果系统后出现错误的解决方案
- npm install 安装软件,出现 operation not permitted, mkdir 解决办法
- CentOS 安装软件出现错误:/lib/ld-linux.so.2: bad ELF interpreter 解决
- Ubuntu安装软件时出现错误:Reading package lists... Error!
- pip 安装出现超时的错误
- 关于Ubuntu16.04lts出现的安装软件出现错误------snapd软件错误
- npm安装时出现错误解决办法及mac下升级node.js
- ubuntu出现系统内部错误--安装了一些陈旧的软件包
- WIN7 下安装软件出现出現 "Internal Error 2739"错误的解决方法
- Mac 用RVM安装ruby 2.0.0的时候出现错误
- ubuntu安装软件中出现依赖性错误无法安装解决办法
- 在安装软件时出现,“错误1327。无效驱动器:G: \”
- 安装cocoapods时出现错误 Operation not permitted - /usr/bin/pod
- 使用Mac App Store更新、下载软件时出现未知错误的解决方法
- win8系统下安装软件老是出现扩展属性不一致的错误??
- Win10安装软件时出现2502、2503错误代码的问题