具体场景及报错信息:
C:\Users\xxx\PycharmProjects\image_classifi>pip install tb-nightly
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
安装tb-lightly失败:
ERROR: Could not find a version that satisfies the requirement tb-nightly (from versions: none)
ERROR: No matching distribution found for tb-nightly
解决方案:
- 说明,我们的pip源中没有对应的“tb-nightly”依赖包。查看pip配置命令:
python -m pip config list
,我的显示的清华源,现在需要换源。
运行后效果:
- 更换为阿里源命令:
python -m pip config set global.index-url https://mirrors.aliyun.com/pypi/simple
运行后效果:
-
再次查看pip配置:
python -m pip config list
,即可看到换源成功:
-
再次重新安装tb-nightly就可以了
pip install tb-nightly
-
最后建议在换回之前的源(保险起见):
python -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple