V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
swx934
V2EX  ›  问与答

在 ubuntu 上安装 python3 模块老是提示‘......you may want sudo's -H flag.....’不知道是否成功安装,以及后续如何调整避免这样的提示

  •  
  •   swx934 · Dec 7, 2017 · 6477 views
    This topic created in 3066 days ago, the information mentioned may be changed or developed.

    在 ubuntu 上安装 python3 模块老是提示‘......you may want sudo's -H flag.....’不知道是否成功安装?以及后续如何调整?避免这样的提示

    wilson@linux:~$ sudo pip3 install send2trash The directory '/home/wilson/.cache/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 '/home/wilson/.cache/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.

    7 replies    2017-12-07 22:37:13 +08:00
    zgx030030
        1
    zgx030030  
       Dec 7, 2017
    提示让你用 sudo 来执行啊老哥。。。
    swx934
        2
    swx934  
    OP
       Dec 7, 2017
    我加了的啊
    zgx030030
        3
    zgx030030  
       Dec 7, 2017
    @swx934 哦那我看错了哈哈, 你加-H 试试? sudo -H pip install xxx
    swx934
        4
    swx934  
    OP
       Dec 7, 2017
    问已经解决了,安装 pip3 需要授权管理权限,待 pip3 安装完成后,通过其安装第三方模块旧不需要授权管理权限,直接安装旧可以了。
    Trim21
        5
    Trim21  
       Dec 7, 2017
    @swx934 #4 是先用 sudo -H 安装 pip3 吗?
    swx934
        6
    swx934  
    OP
       Dec 7, 2017
    不要加-H,直接 sudo
    rob001
        7
    rob001  
       Dec 7, 2017
    权限不足
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5138 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 08:14 · PVG 16:14 · LAX 01:14 · JFK 04:14
    ♥ Do have faith in what you're doing.