安装Python的pip时,使用sudo需注意启用sudo的-H标志吗?
- 内容介绍
- 文章标签
- 相关推荐
本文共计219个文字,预计阅读时间需要1分钟。
错误内容:The directory '/Users/zhouyueyang/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
修改后:报错内容:WARNING:目录'/Users/zhouyueyang/Library/Caches/pip/http'或其父目录不属于当前用户,缓存已被禁用。请检查该目录的权限和所有者。如果执行
报错内容
WARNING: The directory '/Users/zhouyueyang/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.WARNING: The directory '/Users/zhouyueyang/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.
解决方法
sudo -H pip install flask(库名)
本文共计219个文字,预计阅读时间需要1分钟。
错误内容:The directory '/Users/zhouyueyang/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
修改后:报错内容:WARNING:目录'/Users/zhouyueyang/Library/Caches/pip/http'或其父目录不属于当前用户,缓存已被禁用。请检查该目录的权限和所有者。如果执行
报错内容
WARNING: The directory '/Users/zhouyueyang/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.WARNING: The directory '/Users/zhouyueyang/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.
解决方法
sudo -H pip install flask(库名)

