简体   繁体   中英

Can't import tensorflow on windows, python 3.5

when I try to run import tensorflow on pycharm I get the following error message:

Traceback (most recent call last):
      File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
        module = self._system_import(name, *args, **kwargs)
    ImportError: No module named 'numpy.core._multiarray_umath'
    ImportError: numpy.core.multiarray failed to import
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
      File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
        module = self._system_import(name, *args, **kwargs)
      File "<frozen importlib._bootstrap>", line 968, in _find_and_load
    SystemError: PyEval_EvalFrameEx returned a result with an error set
    2019-06-13 17:03:10.027225: F tensorflow/python/lib/core/bfloat16.cc:675] Check failed: PyBfloat16_Type.tp_base != nullptr 

I have tried to uninstall and install tensorflow using pip command, it didn't help.

conda install -c conda-forge tensorflow

OR

conda create -n tensorflow pip python=3.5

// cmd for activation

c:> activate tensorflow

(tensorflow)C:> pip install --ignore-installed --upgrade tensorflow

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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