When I run the commmand

easy_install pip

I get:

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-6775.write-test'

The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was:

/Library/Python/2.7/site-packages/

How can I deal with this problem??

有帮助吗?

解决方案

There are two solutions to this. The first is to use either root or sudo to install pip for the entire system

sudo easy_install pip

The second option is to is to use the per user site-packages that were introduced in PEP 370. This can be done with the --user option

easy_install pip --user
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top