import tensorflow 报错解决

TensorFlow 专栏收录该内容
1 篇文章 0 订阅

解决>>> import tensorflow
ModuleNotFoundError: No module named ‘numpy.core._multiarray_umath’ 错误

安装TensorFlow以后,在python编辑器上输入 import tensorflow,报错。

然后:

升级一下你的pip,重新安装一下numpy

pip install --upgrade pip
pip install --upgrade numpy

然后安装成功以后 继续 import TensorFlow

>>> import tensorflow
/Users/mbp/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters

好吧,继续报错,在某个网站看到时候要 这样做

pip install numpy==1.16

然后安装成功以后 继续 import TensorFlow

>>> import tensorflow
/Users/mbp/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters

继续再找原因,缺少 h5py,

$ pip install h5py==2.8.0rc1

输入以后,大功告成!

  • 2
    点赞
  • 1
    评论
  • 1
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

©️2021 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值