错误:OSError: [Errno 1] Operation not permitted: 'lib/python/six-1.4.1-py2.7.egg-info'
解决办法:
$ sudo chown -R $USER /usr/local/lib/python2.
$ pip install mock --ignore-installed six --user
问题:安装mock时报错:
(venv)➜ test git:(master) pip install mock
Requirement already satisfied: mock in /Library/Python/2.7/site-packages
Collecting six>=1.9 (from mock)
Using cached six-1.11.-py2.py3-none-any.whl
Requirement already satisfied: funcsigs>=; python_version < "3.3" in /Library/Python/2.7/site-packages (from mock)
Requirement already satisfied: pbr>=0.11 in /Library/Python/2.7/site-packages (from mock)
Installing collected packages: six
Found existing installation: six 1.4.
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.:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line , in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line , in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line , in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line , in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line , in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line , in renames
shutil.move(old, new)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line , in move
copy2(src, real_dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line , in copy2
copystat(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line , in copystat
os.chflags(dst, st.st_flags)
OSError: [Errno ] Operation not permitted: '/var/folders/pk/7yrbjrzx0j76mvd9s49djz_40000gn/T/pip-ogx4a9-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
参考:https://github.com/donnemartin/haxor-news/issues/54
pip install --ignore-installed six
又报错:
(venv)➜ test git:(master) pip install mock --ignore-installed six
Collecting mock
Using cached mock-2.0.-py2.py3-none-any.whl
Collecting six
Using cached six-1.11.-py2.py3-none-any.whl
Collecting funcsigs>=; python_version < "3.3" (from mock)
Using cached funcsigs-1.0.-py2.py3-none-any.whl
Collecting pbr>=0.11 (from mock)
Using cached pbr-3.1.-py2.py3-none-any.whl
Installing collected packages: six, funcsigs, pbr, mock
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line , in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line , in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line , in install
**kwargs
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line , in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line , in move_wheel_files
isolated=self.isolated,
File "/Library/Python/2.7/site-packages/pip/wheel.py", line , in move_wheel_files
clobber(source, lib_dir, True)
File "/Library/Python/2.7/site-packages/pip/wheel.py", line , in clobber
shutil.copyfile(srcfile, destfile)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line , in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno ] Permission denied: '/Library/Python/2.7/site-packages/six.py'
参考:https://github.com/pypa/pip/issues/4186
pip install mock --ignore-installed six --user
又遇到错误:
Collecting mock
Using cached mock-2.0.-py2.py3-none-any.whl
Collecting six
Using cached six-1.11.-py2.py3-none-any.whl
Collecting funcsigs>=; python_version < "3.3" (from mock)
Using cached funcsigs-1.0.-py2.py3-none-any.whl
Collecting pbr>=0.11 (from mock)
Using cached pbr-3.1.-py2.py3-none-any.whl
Installing collected packages: six, funcsigs, pbr, mock
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line , in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line , in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line , in install
**kwargs
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line , in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line , in move_wheel_files
isolated=self.isolated,
File "/Library/Python/2.7/site-packages/pip/wheel.py", line , in move_wheel_files
maker.make_multiple(['%s = %s' % kv for kv in console.items()])
File "/Library/Python/2.7/site-packages/pip/_vendor/distlib/scripts.py", line , in make_multiple
filenames.extend(self.make(specification, options))
File "/Library/Python/2.7/site-packages/pip/_vendor/distlib/scripts.py", line , in make
self._make_script(entry, filenames, options=options)
File "/Library/Python/2.7/site-packages/pip/_vendor/distlib/scripts.py", line , in _make_script
self._write_script(scriptnames, shebang, script, filenames, ext)
File "/Library/Python/2.7/site-packages/pip/_vendor/distlib/scripts.py", line , in _write_script
self._fileop.write_binary_file(outname, script_bytes)
File "/Library/Python/2.7/site-packages/pip/_vendor/distlib/util.py", line , in write_binary_file
with open(path, 'wb') as f:
IOError: [Errno ] Permission denied: '/usr/local/bin/pbr'
最后:
(venv)➜ test git:(master) pip install mock --ignore-installed six --user
Collecting mock
Using cached mock-2.0.-py2.py3-none-any.whl
Collecting six
Using cached six-1.11.-py2.py3-none-any.whl
Collecting funcsigs>=; python_version < "3.3" (from mock)
Using cached funcsigs-1.0.-py2.py3-none-any.whl
Collecting pbr>=0.11 (from mock)
Using cached pbr-3.1.-py2.py3-none-any.whl
Installing collected packages: six, funcsigs, pbr, mock
Successfully installed funcsigs-1.0. mock-2.0. pbr-3.1. six-1.11.
错误:OSError: [Errno 1] Operation not permitted: 'lib/python/six-1.4.1-py2.7.egg-info'的更多相关文章
- macosx 10.11 python pip install 出现错误OSError: [Errno 1] Operation not permitted:
Exception: Traceback (most recent call last): File , in main status = self.run(options, args) File , ...
- 【Python学习笔记】macosx 10.11 python pip install 出现错误OSError: [Errno 1] Operation not permitted:
http://www.cnblogs.com/xiongqiangcs/p/4914049.html pip install --upgrade pip sudo pip install numpy ...
- 安装 tensorflow 时遇到 OSError: [Errno 1] Operation not permitted 的解决办法
Installing collected packages: numpy, scipy, six, pyyaml, Keras, opencv-python, h5py, html5lib, blea ...
- 安装Pod时提示ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/pod
环境:OSX EI 10.11.1 昨天切换gem源后,招待pod安装没有任何问题,也可以正常用$ gem sources --add https://ruby.taobao.org/ --remov ...
- ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/pod
因为突然要用到cocospod,突然发现在使用pod install的时候出现 -bash: pod: command not found 我去-不知道为什么,然后我就想重新安装下cocospod,在 ...
- 在使用python语言的open函数时,提示错误OSError: [Errno 22] Invalid argument: ‘文件路径’
如题,在使用python语言的open函数时,提示错误OSError: [Errno 22] Invalid argument: '文件路径',在查阅了大量资料后也得到了一些解决方案,但是这些解决方案 ...
- 终端中出现While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/pod错误的修改方法
把输入终端的sudo gem install cocoapods改为 sudo gem install -n /usr/local/bin/ cocoapods即可
- Jekyll 安装权限问题 ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/jekyll
OS X El Capitan 新特性(System Integrity Protection or SIP)中加强了权限,但是可以对这里进行操作 /usr/local/bin 可以尝试使用以下指令进 ...
- Mac OS X系统下,svn: Can't remove file Operation not permitted.解决方案
当你的svn出现类似以下错误时,提示Operation not permitted之类的问题,说明项目下 .svn文件夹内的文件权限有问题. 一般是由于windows和mac操作系统同时操作同个svn ...
随机推荐
- BZOJ.3928.[CERC2014]Outer space invaders(区间DP)
BZOJ3928 双倍经验BZOJ4048 Codeforces GYM100543 L \(Description\) \(Solution\) 考虑出现时间在\([l,r]\)内的敌人,设最远的敌 ...
- BZOJ.3757.苹果树(树上莫队)
题面链接 /* 代码正确性不保证..(不过交了SPOJ没WA T了最后一个点) 在DFS序做莫队 当一个点不是另一个点的LCA时,需要加上它们LCA的贡献 */ #include <cmath& ...
- CentOS+Nginx+PHP 前端部署
都说Nginx比Apache性能优越,一直没有时间装测试,今天终于有时间装上试试性能了,其实Nginx的安装非常简单,具体流水步骤记录如下: 1.系统环境: ===================== ...
- FTP和TCP的文件传输效率对比测试分析
前言 最近因项目需要,需要把一定数量的中等文件从开发板上传到电脑上,分别选择了FTP和TCP自定义协议两种方式进行传输,进行了简单的对比测试,故做如下记录. 测试环境 开发板:Linux,ARMv7 ...
- How to modify analog output range of Arduino Due
Voltage Translation for Analog to Digital Interface ADC How to modify analog output range of Arduino ...
- ITxlab倡议启动“互联网X大脑”计划
导语:"互联网X大脑"计划由ITxlab(互联网X实验室)联合科学院相关机构.基于7年以来取得的研究成果,倡议建立的互联网与脑科学前沿研究平台,吸引不同领域专家进行科学研究和成果交 ...
- C#编程(七十五)----------C#使用指针
原文链接: http://blog.csdn.net/shanyongxu/article/details/47321441 在C#中使用指针的语法 如果想在C#中使用指针,首先对项目进行过配置: 看 ...
- c++中string类对象和字符数组之间的相互转换
string类在c++中是一个模板类,位于名字空间std中,注意这里不是string.h,string.h是C字符串头文件. 将string类型转换为字符数组char arr[10];string s ...
- HTML:DOM 对象
ylbtech-HTML:DOM 对象 1. Document 对象返回顶部 1-1. Document 对象 每个载入浏览器的 HTML 文档都会成为 Document 对象. Document 对 ...
- Revit对齐工具之多重对齐
Revit对齐工具用来将一个或多个图元与选定图元对齐,比如建筑建筑时可以将梁.墙.柱等对齐到轴网,或者其它类似的图元的对齐,可以对齐同一类型的图元,或者不同类型族间的对齐,可以在二维视图.立面视图和三 ...