问题:超时
解决办法:
pip --default-timeout=100 install tensorflow -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
速度快到飞起!
一开始有容量不够的问题,卸载几个c盘程序之后,ok了。
pip list 检查一下有tensorflow,但是进入Python之后import却显示没有这个模块。
解决办法:
查看匹配的库具体名称conda search --full-name tensorflow
看到和python3.7版本匹配的版本,选一个1.14版本的
再安装一次
pip --default-timeout=100 install tensorflow==1.14 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
然后进入python,尝试
import tensorflow
终于!激动人心的时刻到了,导入成功了,但是有一堆warning,看大概是numpy这个库产生了问题:
D:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
D:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,))</