简体   繁体   中英

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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