sudo pip安装django [英] sudo pip install django
问题描述
谢谢!下面是我终端的输出
macbook:〜Asif $ sudo pip install Django
密码:
目录'/ Users / Asif / Library / Logs / pip'或其父目录不是当前用户所有,并且调试日志已被禁用。请检查该目录的权限和所有者。如果使用sudo执行pip,则可能需要-H标志。
目录/ Users / Asif / Library / Caches / pip / http或其父目录不是当前用户所有,缓存已被禁用。请检查该目录的权限和所有者。如果使用sudo执行pip,则可能需要-H标志。
目录/ Users / Asif / Library / Caches / pip / http或其父目录不是当前用户所有,缓存已被禁用。请检查该目录的权限和所有者。如果使用sudo执行pip,则可能需要-H标志。
收集Django
下载Django-1.7.3-py2.py3-none-any.whl(7.4MB)
100%| ############# ################### | 7.4MB 2.3MB / s
安装收集的软件包:Django
成功安装Django-1.7.3
这些消息只是告诉你,在发行 sudo
之后,当前用户已经更改为 root
和 root
不是这些目录的所有者或其中一个父目录。
sudo -H
将 $ HOME
环境变量设置为 / root
,可能会隐藏这些,但是你的方式是完美的。
我很确定这些信息是无关紧要的关于,但总是很高兴看到人们正在阅读他们并确保。
另外,为了验证这一点,您可以尝试:
$ sudo env |少
和
code> $ sudo -H env |少
并注意$ HOME和$ USER变量
So this is my first attempt at trying to install Django, and when I ran it, it successfully installed Django-1.7.3 but I received these warnings below. I wasn't able to find any information about it online so I was hoping someone could clarify what they mean, if I need to fix them, and how I could go about doing that?
Thanks! below is the output from my terminal
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
These messages are just telling you that after issuing sudo
the current user has changed to root
and root
isn't the owner of those directories or one of the parent directories.
sudo -H
sets the $HOME
environment variable to /root
and would probably hide these but the way you did it is perfectly fine.
I'm pretty sure these messages are nothing to be concerned about, but its always good to see that people are reading them and making sure.
Also, to verify this, you can try:
$ sudo env | less
and
$ sudo -H env | less
and pay attention to the $HOME and $USER variables
这篇关于sudo pip安装django的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!