简体   繁体   English

pip install --upgrade 给出相同的警告

[英]pip install --upgrade gives the same warning

Successfully installed pip-21.0.1
WARNING: You are using pip version 20.2.1; however, version 21.0.1 is available.

Full trace完整跟踪

$ /usr/bin/python3 -m pip install --upgrade pip
Defaulting to user installation because normal site-packages is not writeable
Collecting pip
  Downloading pip-21.0.1-py3-none-any.whl (1.5 MB)
     |████████████████████████████████| 1.5 MB 19.7 MB/s
Installing collected packages: pip
  WARNING: The scripts pip, pip3 and pip3.6 are installed in '/home/ubuntu/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-21.0.1
WARNING: You are using pip version 20.2.1; however, version 21.0.1 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.

Despite upgrading why does it give the warning?尽管升级了为什么它会发出警告?

You don't have write permission to do the site-package upgrade re site-packages is not writeable .您没有写入权限来执行站点包升级 re site-packages is not writeable You can run it with sudo if you wish, although for a Debian based distribution it would be more appropriate to leave package managed files alone.如果您愿意,可以使用sudo运行它,尽管对于基于 Debian 的分发,单独保留 package 托管文件会更合适。

And you are not using the local version you installed re `'/home/ubuntu/.local/bin' which is not on PATH`.

To do this,

export PATH=$PATH:/home/ubuntu/.local/bin导出 PATH=$PATH:/home/ubuntu/.local/bin

Use sudo /usr/bin/python3 -m pip install --upgrade pip使用sudo /usr/bin/python3 -m pip install --upgrade pip

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM