error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the

installation directory:

[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-1563.pth'

The installation directory you specified (via --install-dir, --prefix, or

the distutils default setting) was:

/Library/Python/2.7/site-packages/

Perhaps your account does not have write access to this directory?  If the

installation directory is a system-owned directory, you may need to sign in

as the administrator or "root" account.  If you do not have administrative

access to this machine, you may wish to choose a different installation

directory, preferably one that is listed in your PYTHONPATH environment

variable.

For information on other options, you may wish to consult the

documentation at:

https://pythonhosted.org/setuptools/easy_install.html

Please make the appropriate changes for your system and try again.

liuchuanwudeMacBook-Pro:~ liuchuanwu$ su-(easy_install jinja2)

-bash: syntax error near unexpected token `easy_install'

liuchuanwudeMacBook-Pro:~ liuchuanwu$ clear

liuchuanwudeMacBook-Pro:~ liuchuanwu$ easy_install jinja2

error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the

installation directory:

[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-1568.pth'

The installation directory you specified (via --install-dir, --prefix, or

the distutils default setting) was:

/Library/Python/2.7/site-packages/

Perhaps your account does not have write access to this directory?  If the

installation directory is a system-owned directory, you may need to sign in

as the administrator or "root" account.  If you do not have administrative

access to this machine, you may wish to choose a different installation

directory, preferably one that is listed in your PYTHONPATH environment

variable.

For information on other options, you may wish to consult the

documentation at:

https://pythonhosted.org/setuptools/easy_install.html

Please make the appropriate changes for your system and try again.

解决办法:

不要再输入 easy_install jinja2改成

sudo easy_install jinja2

然后让你输入密码就OK啦;

easy_install jinja2 mac linux的更多相关文章

  1. MAC && Linux terminal session clone

    MAC && Linux terminal session clone 背景 本人使用的是mac,terminal配置的是iterm2,相信许多公司和我司一样登录dev/beta/pr ...

  2. 在Mac/Linux/Windows上编译corefx遇到的问题及解决方法

    这两天尝试在Mac/Linux/Windows三大平台上编译.NET跨平台三驾马车(coreclr/corefx/dnx)之一的corefx(.NET Core Framework),结果三个平台的编 ...

  3. Sublime Text 2 - 性感无比的代码编辑器!程序员必备神器!跨平台支持Win/Mac/Linux

    我用过的编辑器不少,真不少- 但却没有哪款让我特别心仪的,直到我遇到了 Sublime Text 2 !如果说“神器”是我能给予一款软件最高的评价,那么我很乐意为它封上这么一个称号.它小巧绿色且速度非 ...

  4. OpenGL环境搭建Windows+Mac+Linux

    OpenGL环境搭建Windows+Mac+Linux Mac平台下 下载列表:GLFWcmake 下载的GLFW解压缩 然后安装cmake, 安装好cmake之后打开 1.browse source ...

  5. [转载]Sublime Text 2 - 性感无比的代码编辑器!程序员必备神器!跨平台支持Win/Mac/Linux

    代码编辑器或者文本编辑器,对于程序员来说,就像剑与战士一样,谁都想拥有一把可以随心驾驭且锋利无比的宝剑,而每一位程序员,同样会去追求最适合自己的强大.灵活的编辑器,相信你和我一样,都不会例外. 我用过 ...

  6. 解决Mac Linux USB Loader“Couldn't get security scoped bookmarks”错误

    Mac Linux USB Loader出现 "Couldn't get security scoped bookmarks"错误时, 需要删除 ~/Library/Contain ...

  7. Python 虚拟环境 | Mac/Linux下如何避坑安装配置Virtualenv

    1.为什么要使用虚拟环境 在Python中,不同的应用可能需要用到不同版本的第三方包,而这些第三方包被统一存放到目录site-packages中,不同版本的包容易相互覆盖,如安装Django 2.1时 ...

  8. BesLyric 全新版本下载 ( windows \ mac \ linux )

    导读 BesLyric , 一款专门制作 网易云音乐 LRC 滚动歌词的软件! 搜索.下载.制作 歌词更方便! 很荣幸地,自 beslyric 2017 年开发推出以来,得到了很多云村村民的肯定,现在 ...

  9. 查看 Mac/Linux 某端口占用情况

    Mac/Linux 平台下,通用命令: lsof -i:8080  (8080 为 端口号,根据需要,替换为其他端口号) 可以查看该端口被什么程序占用,并显示 pid,方便 kill 掉 Linux如 ...

随机推荐

  1. Ant build ${renderscript.opt.level}问题解决方案

    问题如下: BUILD FAILEDD:\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:653: The following e ...

  2. parseInt 的第二个参数

    ["1","2","3"].map(parseInt) //[1,NaN,NaN] ["1","2" ...

  3. @synchronized (object)使用详解

    synchronized关键字代表这个方法加锁,相当于不管哪一个线 程A每次运行到这个法时,都要检查有没有其它正在用这个方法的线程B(或者C D等),有的话要等正在使用这个方法的线程B(或者C D)运 ...

  4. JavaScript设计模式-单例模式、模块模式(转载 学习中。。。。)

    (转载地址:http://technicolor.iteye.com/blog/1409656) 之前在<JavaScript小特性-面向对象>里面介绍过JavaScript面向对象的特性 ...

  5. Maven——eclipse中使用Maven创建Web项目

    原文:http://www.cnblogs.com/xdp-gacl/p/4054814.html 一.创建Web项目 1.1 选择建立Maven Project 选择File -> New - ...

  6. vim 学习记录2

    当前行进行替换:s/XXX/YYY/gXXX是需要替换的字符串,YYY是替换后的字符串. 全局替换:% s/XXX/YYY/g. 对指定部分进行替换用V进入visual模式,再进行:s/XXX/YYY ...

  7. Working with Data » Getting started with ASP.NET Core and Entity Framework Core using Visual Studio » 排序、筛选、分页以及分组

    Sorting, filtering, paging, and grouping 7 of 8 people found this helpful By Tom Dykstra The Contoso ...

  8. DirectX中的纹理及其创建

    正如大多初学者会遇到一个问题, 导入的图片为何不是原来的尺寸?例如800*600的实际上通过D3DXCreateTextureFromFile后变成的是1024*1024,即宽和高默认都会自动扩展为2 ...

  9. 编程获得CPU的主频

    CPU的主频,即CPU内核工作的时钟频率(CPU Clock Speed).CPU的主频表示在CPU内数字脉冲信号震荡的速度.主频和实际的运算速度存在一定的关系,但目前还没有一个确定的公式能够定量两者 ...

  10. C#程序以管理员权限运行【我采用了第二种,比较好用】

    在Vista 和 Windows 7 及更新版本的操作系统,增加了 UAC(用户账户控制) 的安全机制,如果 UAC 被打开,用户即使以管理员权限登录,其应用程序默认情况下也无法对系统目录.系统注册表 ...