sudo pip 安装 django
sudo pip install django
所以这是我第一次尝试安装 Django,当我 运行 它成功安装 Django-1.7.3 但我收到以下警告。我无法在网上找到有关它的任何信息,所以我希望有人能澄清它们的意思,如果我需要修复它们,以及我该如何去做?
谢谢!下面是我终端的输出
macbook:~ Asif$ sudo pip install Django
Password:
The directory '/Users/Asif/Library/Logs/pip' or its parent directory is not owned by the current user and the debug log has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want the -H flag.
The directory '/Users/Asif/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 the -H flag.
The directory '/Users/Asif/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 the -H flag.
Collecting Django
Downloading Django-1.7.3-py2.py3-none-any.whl (7.4MB)
100% |################################| 7.4MB 2.3MB/s
Installing collected packages: Django
Successfully installed Django-1.7.3
这些消息只是告诉您在发出 sudo
之后当前用户已更改为 root
并且 root
不是这些目录或父目录之一的所有者.
sudo -H
将 $HOME
环境变量设置为 /root
并且可能会隐藏这些,但您这样做的方式非常好。
我很确定这些消息没有什么值得担心的,但看到人们正在阅读它们并确定总是很高兴。
另外,为了验证这一点,您可以尝试:
$ sudo env | less
和
$ sudo -H env | less
并注意 $HOME 和 $USER 变量
所以这是我第一次尝试安装 Django,当我 运行 它成功安装 Django-1.7.3 但我收到以下警告。我无法在网上找到有关它的任何信息,所以我希望有人能澄清它们的意思,如果我需要修复它们,以及我该如何去做?
谢谢!下面是我终端的输出
macbook:~ Asif$ sudo pip install Django
Password:
The directory '/Users/Asif/Library/Logs/pip' or its parent directory is not owned by the current user and the debug log has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want the -H flag.
The directory '/Users/Asif/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 the -H flag.
The directory '/Users/Asif/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 the -H flag.
Collecting Django
Downloading Django-1.7.3-py2.py3-none-any.whl (7.4MB)
100% |################################| 7.4MB 2.3MB/s
Installing collected packages: Django
Successfully installed Django-1.7.3
这些消息只是告诉您在发出 sudo
之后当前用户已更改为 root
并且 root
不是这些目录或父目录之一的所有者.
sudo -H
将 $HOME
环境变量设置为 /root
并且可能会隐藏这些,但您这样做的方式非常好。
我很确定这些消息没有什么值得担心的,但看到人们正在阅读它们并确定总是很高兴。
另外,为了验证这一点,您可以尝试:
$ sudo env | less
和
$ sudo -H env | less
并注意 $HOME 和 $USER 变量