pip install安装tensorflow失败

在终端中输入pip install tensorflow,报错如下,使用pip3也不行

ERROR: Could not find a version that satisfies the requirement tensorflow
ERROR: No matching distribution found for tensorflow

 解决方法如下:

使用豆瓣的镜像源,在终端输入:

pip3 install tensorflow-hub -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

就成功了

拓展:

如果要安装其他的包,比如gym,就用下面的语句就可以安装了,把安装包换成你要安装的包名gym

pip install <软件包> -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

猜你喜欢

转载自blog.csdn.net/bulletstart/article/details/131057456