使用阿里的pip源安装TensorFlow失败处理

今天用pip指定安装源为阿里的地址时,安装报错,提示如下:

(testPython) C:\Users\yangs\testPython\Scripts>pip install --ignore-installed --upgrade tensorflow -i http://mirrors.aliyun.com/pypi/simple/

Looking in indexes: http://mirrors.aliyun.com/pypi/simple/

Collecting tensorflow

  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'.

  ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)

ERROR: No matching distribution found for tensorflow

提示说这个地址没有用https,建议你用https的地址,无论如何多要使用,则使用--trusted-host mirrors.aliyun.com

在命令行后面加上--trusted-host mirrors.aliyun.com

pip install --ignore-installed --upgrade tensorflow -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com

安装完以后,使用pip list看看是否安装完成;

pip list

进入Jupyter notebook测试正常
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容