首页 > 解决方案 > pip install --upgrade 给出相同的警告

问题描述

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

完整跟踪

$ /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.

尽管升级了为什么它会发出警告?

标签: pythonpip

解决方案


您没有执行 site-package upgrade re 的写入权限site-packages is not writeable。如果您愿意,您可以运行它sudo,尽管对于基于 Debian 的发行版,不理会软件包管理文件会更合适。

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

To do this,

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


推荐阅读