pip安装包报错Could not find a version that satisfies the requirement pymysql (from versions: none)

pip安装包报错Could not find a version that satisfies the requirement pymysql (from versions: none)

1 年前

当我们使用python自带的pip安装一些包时,可能会报以下错误:

找不到满意的版本

第一种可能:

这时可能需要我们升级一下pip版本,于是执行命令

python -m pip install --upgrade pip

执行完后发现还是报一样的错误,

第二种可能:

这时考虑换一个pip源

pip install pymysql -i https://pypi.tuna.tsinghua.edu.cn/simple/

执行完后发现还是报一样的错误

第三种可能:

这时考虑是网速的原因,这时采用国内的镜像源来加速

pip install 包名-i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

--trusted-host pypi.douban.com 这是为了获得ssl证书的认证

执行成功!

编辑于 2021-07-28 20:39