When importing tensorflow, I get the following error: No module named 'numpy.core._multiarray_umath'

后端 未结 3 1979
抹茶落季
抹茶落季 2020-12-09 14:43

I have installed Ancaconda3 and Tensorflow. When I try to import Tensorflow in python shell I receive the following error:

ModuleNotFoundError: No mod

相关标签:
3条回答
  • 2020-12-09 15:09

    I also had the same issue. It got resloved once i upgraded the numpy from 1.15.4 to 1.16.1.

    If you're using pip: pip install numpy --upgrade

    Numpy that came with Anaconda3 is of version 1.15.4. so i upgraded and it worked.


    Side note: if you're also using scikit-image in your script, be aware that numpy 1.16.3 has a conflict with old versions of scikit-image (e.g. you may get ImportError: cannot import name '_validate_lengths'). In that case, pip install --upgrade scikit-image from terminal solved the issue for me.

    Hope it helps!!

    0 讨论(0)
  • 2020-12-09 15:15

    Kindly check whether you have installed the numpy package from pip. Because if you are running on conda evironment, then all packages need to be downloaded from there. Please use the below mentioned statement for this purpose

    conda install -c anaconda numpy

    Also make sure that the numpy version supports the Python version you are using.

    0 讨论(0)
  • 2020-12-09 15:19

    You can use two options in python 3.6

    1. Install

    py pip -m install numpy==1.14.5

    1. Upgrade

    py pip install numpy --upgrade

    Note: the version most recently is 1.14.5

    0 讨论(0)
提交回复
热议问题