OSError: [Errno 1] Operation not permitted: '/tmp/pip-g3bg0s-uninstall/System/Library/Frameworks/Pyt
来源:互联网 发布:gre单词软件 编辑:程序博客网 时间:2024/05/17 22:01
一、问题描述
在用下列名字安装时
sudo -H pip install Scrapy
sudo pip install virtualenvwrapper
出现下列错误
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-g3bg0s-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
二、问题分析解决:
Scrapy,virtualenvwrapper需要依赖six,在安装six的时候发现系统已经有一个six-1.4.1,但是virtualenvwrapper需要six-1.9.0,于是想先卸载老版本的six,此时问题来了,发现没有权限卸载,此时我就纳闷,加上sudo,还是没权限。于是Google之,最终还是在万能的GitHub找到答案。six-1.4.1是系统内置的packages,因 系统集成保护 你是没有权限去修改/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info目录的。因此在安装virtualenvwrapper的时候需要选择忽略six的安装:
sudo pip install virtualenvwrapper --upgrade --ignore-installed six
sudo pip install Scrapy --upgrade --ignore-installed six
- OSError: [Errno 1] Operation not permitted: '/tmp/pip-g3bg0s-uninstall/System/Library/Frameworks/Pyt
- 解决 mac OSX pip OSError: [Errno 1] Operation not permitted
- OSError: [Errno 1] Operation not permitted
- OSError: [Errno 1] Operation not permitted
- MAC下解决pip安装权限问题 OSError: [Errno 13] Permission denied OSError: [Errno 1] Operation not permitted:
- MAC 解决OSError: [Errno 1] Operation not permitted
- 解决 mac安装或者更新第三方包安装不上的问题 mac OSX pip OSError: [Errno 1] Operation not permitted
- Failed to unlink socket file /tmp/mongodb-27017.sock errno:1 Operation not permitted
- 启动MongoDB时出现Failed to unlink socket file /tmp/mongodb-27017.sock errno:1 Operation not permitted
- ln: /System/Library/Perl/Extras/5.18/SVN: Operation not permitted
- linux多线程创建失败,errno=1:Operation not permitted
- pip install operation not permitted 解决办法
- 关于Mac OS下的pip:Operation not permitted问题
- 10.11,Library not loaded: libmysqlclient.18.dylib,Operation not permitted
- mac下更新pip时提示OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pip-8.0.2-py2.
- setgid: Operation not permitted
- ptrace: Operation not permitted.
- Operation not permitted解决方法
- VS2013设置release版本可调试
- OpenCV对图像进行读取→显示→保存的源码!
- 【AC梦工厂】2017 Multi-University Training Contest 3 1003|| HDU6058
- 删除二叉查找树的节点
- 【ACM/ICPC训练】委派任务
- OSError: [Errno 1] Operation not permitted: '/tmp/pip-g3bg0s-uninstall/System/Library/Frameworks/Pyt
- 有两个双向循环链表A,B,知道其头指针为:pHeadA,pHeadB,请写一函数将两链表中data值相同的结点删除
- gradle项目链接mysql
- (多校02)hdu 6053 trickgcd (莫比乌斯函数)
- 如何调用chrome的桌面提示框
- 解决python针对hdfs上传和下载问题
- ASP.NET MVC – 模型
- GoogleAnalytics与FirebaseCloudMessage同时使用
- RStudio连接Oracle数据库