使用阿里的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测试正常

你可能感兴趣的:(使用阿里的pip源安装TensorFlow失败处理)