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 ...
随机推荐
- 使用spark访问hive错误记录
在spark集群中执行./spark-shell时报以下错误: 18/07/23 10:02:39 WARN DataNucleus.Connection: BoneCP specified but ...
- python pip安装其他模块到中途失败问题
当网速很差时,pip安装到中途总是出现一大片红色然后失败.而且往往安装下载很久,失败了就要从新开始,失败如下 就是,当你出现这个错误Could not find a version that sati ...
- deemo
第一部分:结缘计算机 你为什么选择计算机专业?你认为你的条件如何?和这些博主比呢? 因为亲戚的推荐,就业前景好.个人条件的话,算一般.与其他博主相比还是有些差距的. 第二部分:在计算机系里学习 你对你 ...
- Web前端学习第三天(cookie 二)
HttpOniy Cookie机制 在http层面传输cookie,当设置HttpOnly标志后,客户端脚本就无法读写该cookie.可以用此防止xss攻击获取cookie <?php setc ...
- thinkphp5.0.22远程代码执行漏洞分析及复现
虽然网上已经有几篇公开的漏洞分析文章,但都是针对5.1版本的,而且看起来都比较抽象:我没有深入分析5.1版本,但看了下网上分析5.1版本漏洞的文章,发现虽然POC都是一样的,但它们的漏洞触发原因是不同 ...
- java8_api_jdbc
jdbc-1 jdbc的概念 驱动的分类 连接oracle数据库 与任何表格数据源交互 代码编写步骤 加载驱动 Cla ...
- git的基本应用(一)
Git常用的命令: mkdir 文件夹名称 创建文件夹 git init 将文件夹交个git管理 ls -ah ...
- 位(bit)、字节(byte)、字符、编码之间的关系
1.位: 数据存储的最小单位.每个二进制数字0或者1就是1个位: 2.字节: 8个位构成一个字节:即:1 byte (字节)= 8 bit(位): 1 KB = 1024 B(字节): 1 MB = ...
- shibie
var mStream: TMemoryStream; vcode: ..] of AnsiChar; buffer: array of AnsiChar; begin mStream := TMem ...
- SpringMVC Mybatis Spring
Spring MVC Mybatis整合过程中 Mapper.java 不需要使用 @componenet, Service 等spring注解 但是在service 中创建mapper对象的时候是需 ...