tensorflow cpu版,成功安裝后
import tensorflow as tf 報警:“ 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'”
可能原因:numpy 的版本過低或者過高都會出現警告
解決:先卸載現有的numpy版本,並重新指定安裝1.16.4(我的anaconda最新版本)版本的numpy
pip uninstall numpy
pip install numpy==1.16.4
默認鏡像出現下載安裝錯誤
於是更換鏡像源再安裝
pip install numpy==1.16.4 -i https://pypi.tuna.tsinghua.edu.cn/simple/
輸入測試后不再報錯