我的系统上安装了阿卡农达。我安装了TensorFlow
pip install tensorflow
已成功安装:
以下是最后的线索:
Successfully installed absl-py-0.7.0 astor-0.7.1 gast-0.2.2 grpcio-1.19.0
keras-applications-1.0.7 keras-preprocessing-1.0.9 markdown-3.0.1 mock-2.0.0
pbr-5.1.3 protobuf-3.7.0 tensorboard-1.13.0 tensorflow-1.13.1 tensorflow-
estimator-1.13.0 termcolor-1.1.0
现在我尝试运行以下脚本。没什么特别的,只是导入库。
import tensorflow as tf
from tensorflow import keras
import numpy as np
import matplotlib.pyplot as plt
运行脚本时,出现以下错误:
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
ImportError: numpy.core.multiarray failed to import
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 968, in _find_and_load
SystemError: <class '_frozen_importlib._ModuleLockManager'> returned a
result with an error set
ImportError: numpy.core._multiarray_umath failed to import
ImportError: numpy.core.umath failed to import
2019-03-02 04:48:32.404215: F tensorflow/python/lib/core/bfloat16.cc:675]
Check failed: PyBfloat16_Type.tp_base != nullptr
似乎和麻木有关。这是我的麻木版本:'
import numpy
numpy.version.version
1.14.0'
我对python有一些了解,但对tensorflow完全陌生。我在这里做错什么了?