python3.9的pip怎样升级到最新版本?
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python3.9的pip怎样升级到最新版本?相关的知识,希望对你有一定的参考价值。
参考技术A 命令是: python -m pip install --upgrade pip 参考技术B 在cmd中输入“pip install --upgrade pip”命令CTF:pip安装pwntools最新教程(解决旧版本pip升级问题)
首先从使用命令
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py # 下载安装脚本
$ sudo python get-pip.py # 运行安装脚本
这时候一般会这样的错误(下图)。由于我们不知晓pip的版本,部分pip无法使用-v或者-version参数查看版本,这时候我们观察到提示Please use https://bootstrap.pypa.io/pip/2.7/get-pip.py instead.
我们现在看到提示的网站,把那个脚本copy下来放到本地用python跑,保存为get-pip.py
复制全部windows Linux系统使用control+A,Mac系统使用command+A
现在注意提示:
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Looking in indexes: http://pypi.mirrors.ustc.edu.cn/simple
WARNING: The repository located at pypi.mirrors.ustc.edu.cn is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host pypi.mirrors.ustc.edu.cn'.
ERROR: Could not find a version that satisfies the requirement pwntools (from versions: none)
ERROR: No matching distribution found for pwntools
下面使用命令安装pwntools
pip install pwntools --trusted-host http://pypi.mirrors.ustc.edu.cn/simple
以上是关于python3.9的pip怎样升级到最新版本?的主要内容,如果未能解决你的问题,请参考以下文章