ubuntu pip源 旧城等待, 2022-10-02 10:42 111阅读 0赞 pip源有两种设置:1 永久需要更改conf文件,推荐:[https://blog.csdn.net/yucicheung/article/details/79095742][https_blog.csdn.net_yucicheung_article_details_79095742] 但是呢,有时候某个安装包清华源就是不好使,你又删不掉?!所以推荐使用暂时的源。 需要在下面的命令中指定你要安装的东西: 比如安装python pip install python -i http://pypi.douban.com/simple 比如安装tensorflow pip install tensorflow-gpu -i http://pypi.douban.com/simple ,注意如果在上面那个地址:http://pypi.douban.com/simple 没有你需要的包,他就会报错。 你需要换一个安装url pip install tensorflow-gpu -i http://pypi.douban.com/simple --trusted-host pypi.douban.com 你不要直接复制这个代码,你要改成你自己安装的东西,这不是换源,这是在本次安装特别指定源。 # 如果提示你不信任: # WARNING: The repository located at pypi.douban.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 pypi.douban.com'. ERROR: Could not find a version that satisfies the requirement tensorboard (from versions: none) ERROR: No matching distribution found for tensorboard WARNING: The repository located at pypi.douban.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 pypi.douban.com'. 只需要在命令后面增加:--trusted-host pypi.douban.com # 如果指定版本,使用== # tensorflow==1.13.0 [https_blog.csdn.net_yucicheung_article_details_79095742]: https://blog.csdn.net/yucicheung/article/details/79095742
还没有评论,来说两句吧...