在使用pip安装某些包时或者是安装某些插件出现
ERROR: Could not find a version that satisfies the requirement 插件名字 (from versions: none)
ERROR: No matching distribution found for 插件名字
这种情况的时候
两种解决办法
1.可能是pip的版本过低,升级版本
一般会提示
WARNING: You are using pip version 22.0.4; however, version 22.2.2 is available.
You should consider upgrading via the 'D:\python\env\python3.exe -m pip install --upgrade pip' command.
这时候使用python3.exe -m pip install --upgrade pip升级就行了
2.可能是镜像源的问题,换一个镜像源试一试
切换到国内的镜像源
(1)阿里云 http://mirrors.aliyun.com/pypi/simple/
(2)豆瓣http://pypi.douban.com/simple/
(3)清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
(4)中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
(5)华中科技大学http://pypi.hustunique.com/
这里设置为阿里云镜像源
python3 -m pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/
这时候有可能会提示
WARNING: The repository located at mirrors.aliyun.com 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 mirrors.aliyun.com'
此时提示你在后面加上–trusted-host mirrors.aliyun.com信任
使用
python3 -m pip install nb-cli --trusted-host mirrors.aliyun.com安装