tensorflow报错FutureWarning: Passing (type, 1) or ‘1type‘ as a synonym of type is deprecated; in a

本机环境:win7/python3.6/tensorflow1.12/cuda9.0/

import tensorflow

报错如下:
tensorflow报错FutureWarning: Passing (type, 1) or ‘1type‘ as a synonym of type is deprecated; in a_第1张图片
跟一位老大哥请教,说是numpy版本不正确
tensorflow1.12应该安装的numpy版本是1.15.4
于是

pip uninstall numpy
pip install numpy==1.15.4

再次运行

import tensorflow 

平稳落地,呼~~~
感谢老大哥的指点
附上本机的安装包,以供参考:

Package             Version
------------------- --------
absl-py             0.13.0
appdirs             1.4.4
astor               0.8.1
cached-property     1.5.2
dataclasses         0.8
distlib             0.3.2
filelock            3.0.12
gast                0.4.0
graphviz            0.16
grpcio              1.38.0
h5py                3.1.0
importlib-metadata  4.5.0
importlib-resources 5.1.4
Keras               2.2.4
Keras-Applications  1.0.8
Keras-Preprocessing 1.1.2
Markdown            3.3.4
numpy               1.15.4
Pillow              8.2.0
pip                 21.1.2
protobuf            3.17.3
pydot               1.4.2
pydot-ng            2.0.0
pyparsing           2.4.7
PyYAML              5.4.1
scipy               1.5.4
setuptools          40.6.2
six                 1.16.0
tensorboard         1.12.2
tensorflow-gpu      1.12.0
termcolor           1.1.0
typing-extensions   3.10.0.0
virtualenv          20.4.7
Werkzeug            2.0.1
wheel               0.36.2
zipp                3.4.1

你可能感兴趣的:(python,tensorflow,tensorflow,numpy,深度学习)