今天用pip指定安裝源為阿里的地址時(shí),安裝報(bào)錯(cuò)贺待,提示如下:
(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
提示說這個(gè)地址沒有用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