简体   繁体   English

Python Anaconda 3.7.1的Tensorflow失败

[英]Tensorflow failure with Python Anaconda 3.7.1

I installed Anaconda Anaconda3-2018-12 (Python 3.7.1) ( this version). 我安装了Anaconda Anaconda3-2018-12(Python 3.7.1)( 版本)。

Then I opened the "Anaconda prompt", and did pip install keras and pip install tensorflow . 然后我打开“ Anaconda提示符”,并进行了pip install keraspip install tensorflow The installation succeeded but then when doing: 安装成功,但是随后执行以下操作:

import keras

or 要么

import tensorflow

I get: 我得到:

ModuleNotFoundError: No module named 'numpy.core._multiarray_umath' ModuleNotFoundError:没有名为“ numpy.core._multiarray_umath”的模块
ImportError: numpy.core.multiarray failed to import ImportError:numpy.core.multiarray导入失败

The above exception was the direct cause of the following exception: 上面的异常是以下异常的直接原因:

Traceback (most recent call last): 追溯(最近一次通话):
File "", line 980, in _find_and_load _find_and_load中的文件“”,行980
SystemError: returned a result with an error set SystemError:返回了带有错误集的结果
ImportError: numpy.core._multiarray_umath failed to import ImportError:numpy.core._multiarray_umath导入失败
ImportError: numpy.core.umath failed to import ImportError:numpy.core.umath导入失败
2019-02-15 18:33:05.953996: F tensorflow/python/lib/core/bfloat16.cc:675] 2019-02-15 18:33:05.953996:F tensorflow / python / lib / core / bfloat16.cc:675]
Check failed: PyBfloat16_Type.tp_base != nullptr 检查失败:PyBfloat16_Type.tp_base!= nullptr

What could be the problem? 可能是什么问题呢?

正如评论中提到的,这解决了它:

pip install numpy --upgrade

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM