sudo required for easy_install pip in OS X Lion?

冷暖自知 提交于 2019-12-04 06:49:24

Yes. Generally you sudo to use pip. You could change a bunch of permissions and you may not have to but that could break all sorts of things. If you want to avoid re-typing your password try opening a

"sudo screen" session first. Then your shell will be logged in as root and will not prompt for the password. (Using sudo screen will allow you to run pip and other admin commands without typing sudo again)

Actually since Python 2.6 there IS a command line switch that allows you to use pip without the need to sudo.

Try --user like this:

pip install --user <package_name>

You can also add --user to any update script that you may have like

pip freeze --local | grep -v '^\-e' | cut -d = -f 1  | xargs -n1 pip install --user -U
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!