ubuntu18.04 pip 黄色warning

WARNING: The directory '/home/liao/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.

需要改一下文件所有者权限

sudo chown -R root /home/$USERNAME/.cache/pip/

chown:修改的是文件的用户或者组的权限

-R:递归地降序目录,更改每个文件的所有权

posted @ 2022-07-04 14:44  TSrobot  阅读(456)  评论(0)    收藏  举报