pip install pytest on Mac (EI Capitan 10.11.6)
升级了Mac 系统后发现用pip安装pytest出现下面链接中的问题,解决方法是在install时候加上--user选项:
1. 切到home directory: cd ~
2. install pytest: pip install pytest --user
Collecting pytest
Using cached pytest-3.2.2-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from pytest)
Collecting py>=1.4.33 (from pytest)
Using cached py-1.4.34-py2.py3-none-any.whl
Installing collected packages: py, pytest
Successfully installed py-1.4.34 pytest-3.2.2
原文链接如下:
http://marcelog.github.io/articles/mac_osx_python_pip_install_operation_not_permitted.html
PIP Install on Mac: Operation Not Permitted
If you are trying to do a
pip install <package>
on a Mac and get an error like
Could not create /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7: Operation not permitted
You hit an internal protection called System Integrity Protection built-in OS X El Capitan and laterthat, among other things, protects some paths of your root filesystem in a way that not even the user root can write to them.
And your are not alone, this "issue" has hit a lot of users of different open source Python packages, as one can see in some GitHub Issues.
In the specific case of using PIP to install Python packages, you can overcome this by installing everything into your own home directory with the --user flag, like:
pip install <package> --user
This flag is documented in the "Installing to the User Site" section of the "Python Packaging User Guide", and there is more in depth description of the process in the "User Installs" section of the "PIP User Guide"
For more information on SIP, I recommend you start with this great article about OSX El Capitan System Integrity Protection (or SI
pip install pytest on Mac (EI Capitan 10.11.6)的更多相关文章
- OS X EI Capitan 10.11.4中sudo无法起作用的解决方法
mac升级到OSX EI Capitan 10.11.4后sudo命令无法起作用,执行任何操作总是显示Operation denied.这是因为在10.11.4中引入了Rootless机制,即就算是R ...
- iOS开发之网络篇-CocoaPods的安装 EI Capitan 10.11 之前的方式
注意:此种方式,在苹果系统 EI Capitan 10.11 之前的版本,新版本有所不同 一.安装 1> 查看gem源 $ gem sources –l 2> 删除源 (因为本人是第N次 ...
- OS X EI Capitan 10.11.1快速升级方法介绍
公告:本文纯粹是给国内小水管用户而写的,如果你们家网络是100M光线那么就不需要看本文了! 一句话概要本文:在本地山寨从App store服务器上下载安装包的动作! 导读:OS X EI Capita ...
- Xcode8.0 / OS X EI Capitan 10.11.6 提交报错90111
改用新系统和新版xcode(都是正式版)后,提交App Store审核时报错: INFO ITMS-90111: "Beta Toolchain. 构建新的 App 和App 更新时,必须使 ...
- X230 安装 EI Capitan 10.11.5 驱动篇
/* 键盘又换回了 美蓓亚键盘 缩写nmb 虽然比群光软 但是手感真的出色,貌似x宝没有这个代工厂的键盘(全新,非拆机,而且是标准us阵列,背光版) 有人肯定会问,博主这么纠结键盘干嘛? ...
- X230 安装 EI Capitan 10.11.5 总结
/* 写这个文章的目的主要是为了帮助我自己理清思路,如果能顺便帮助到您.even better */ 在动手之前大致浏览了 远景论坛(国内第一黑苹果社区)置顶帖的全部内容 [新人请看]远景 ...
- OS X EI Capitan 10.11 & xcode 7.0 beta(7A120f) -- cocoapods安装失败
1.sudo gem install cocoapods: ERROR:While executing gem ... (Errno:EPERM) Operation not permitted - ...
- mac El Capitan 10.11.6
http://bbs.pcbeta.com/forum.php?mod=viewthread&tid=1702502&authorid=4532202&page=1
- Caffe on Mac OS X 10.11
在Mac环境安装Caffe环境(CPU_ONLY) http://blog.csdn.net/xidiancoder/article/details/52081519 有问题 http://blo ...
随机推荐
- ifeve.com 南方《JVM 性能调优实战之:使用阿里开源工具 TProfiler 在海量业务代码中精确定位性能代码》
https://blog.csdn.net/defonds/article/details/52598018 多次拉取 JStack,发现很多线程处于这个状态: at jrockit/vm/Al ...
- 【EMV L2】Cardholder Verification Rule(CVR) Format
Cardholder Verification Rule(CVR)由两个字节组成: 高字节为Cardholder Verification Method (CVM) Codes,表示执行Cardhol ...
- Homestead的安装配置
laravel学院教程 : http://laravelacademy.org/post/7658.html 参考博文:https://blog.csdn.net/xyxjn/article/deta ...
- Django_ORM相关操作
一般的操作 1.all():查询所有的结果 2.filter():包含与所有筛选条件匹配的对象 3.get():返回与所给筛选条件相匹配的对象,返回结果有且只有一个,如果对象没有或者超过一个会报错 4 ...
- java-多线程(上)
###24.01_多线程(多线程的引入)(了解) * 1.什么是线程 * 线程是程序执行的一条路径, 一个进程中可以包含多条线程 * 多线程并发执行可以提高程序的效率, 可以同时完成多 ...
- robot framework关键词记录单(更新中)
1.select Radio Button groupname value 选择单选按钮 A)适用于input的html单选框,属性中包含name以及value如:Select Radio Butt ...
- 我发起并创立了一个 Javascript 前端库 开源项目 jWebForm
在线演示地址: ( 在线演示 云平台 由 Kooboo 提供 https://www.kooboo.com/ ) 按钮: http://iwebform.kgeking.kooboo.si ...
- docker mysql8 注意
1. mysql8 出了有段时间了,但公司项目的django还不支持mysql8的默认加密方式. 连接时报错 Error : The server requested authentication m ...
- k8s之Hello World(四)
实例:Guestbook留言板系统将通过Pod.RC.Service等资源对象搭建完成,成功启动后在网页中显示一条“Hello World”留言.其系统架构是一个基于PHP+Redis的分布式Web应 ...
- html 出现粒子线条,鼠标移动会以鼠标为中心吸附的特效之canvas-nest.js插件
我在网上看到一个很炫酷,很有趣的特效,网页上会有很多移动的粒子和线条,鼠标经过时会以鼠标为中心吸附过来,如果时间够久,会形成一个类似震动的.带辐条的车轮子的东西. 网上搜了一下,源码是github里面 ...