为什么sudo pip会在我的用户主目录下安装引用库

时间:2017-10-23 21:18:46

标签: python pip

我的印象就是那个

pip install --user 

会将所选的包放在用户的主目录下。那么为什么以下引用 user 特定目录而不是系统级别 - 例如在Mac上的/Library/Python

为了说明:让我们来看看sudo pip install寻找包裹的位置:

$sudo pip install matplotlib

The directory '/Users/myuser/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/myuser/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: matplotlib in /Users/myuser/Library/Python/2.7/lib/python/site-packages
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /Users/myuser/Library/Python/2.7/lib/python/site-packages (from matplotlib)
Requirement already satisfied: numpy>=1.7.1 in /Users/myuser/Library/Python/2.7/lib/python/site-packages (from matplotlib)

所以它在/Users/myuser主目录下查看..那么在系统/library目录下安装的机制是什么?

0 个答案:

没有答案