TensorFlow - ModuleNotFoundError: нет модуля с именем 'numpy.core._multiarray_umath' - PullRequest
0 голосов
/ 23 сентября 2019

Получение ModuleNotFoundError: No module named 'numpy.core._multiarray_umath', как только начинается первая эпоха.Все модули (т. Е. tensorflow, numpy и т. Д.) Обновлены.

ps Ни один из ответов, размещенных здесь для другого вопроса , не работал для меня.Итак, я создал новый вопрос.

Программный стек:

OS: Windows 10 1903
Python: 3.7.4
TensorFlow: 1.14.0
numpy: 1.17.2

Полная трассировка стека ошибок:

ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
ImportError: numpy.core.multiarray failed to import
ImportError: numpy.core._multiarray_umath failed to import
ImportError: numpy.core.umath failed to import
2019-09-23 22:41:24.328882: F tensorflow/python/lib/core/bfloat16.cc:675] Check failed: PyBfloat16_Type.tp_base != nullptr 
Using TensorFlow backend.
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
ImportError: numpy.core.multiarray failed to import
ImportError: numpy.core._multiarray_umath failed to import
ImportError: numpy.core.umath failed to import
Exception in thread Thread-72:
Traceback (most recent call last):
  File "C:\Users\talha\AppData\Local\Programs\Python\Python37\lib\threading.py", line 926, in _bootstrap_inner
    self.run()
  File "C:\Users\talha\AppData\Local\Programs\Python\Python37\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "D:\PyCharmProjects\fer\venv\lib\site-packages\keras\utils\data_utils.py", line 572, in _run
    with closing(self.executor_fn(_SHARED_SEQUENCES)) as executor:
  File "D:\PyCharmProjects\fer\venv\lib\site-packages\keras\utils\data_utils.py", line 554, in <lambda>
    initargs=(seqs,))
  File "C:\Users\talha\AppData\Local\Programs\Python\Python37\lib\multiprocessing\context.py", line 119, in Pool
    context=self.get_context())
  File "C:\Users\talha\AppData\Local\Programs\Python\Python37\lib\multiprocessing\pool.py", line 176, in __init__
    self._repopulate_pool()
  File "C:\Users\talha\AppData\Local\Programs\Python\Python37\lib\multiprocessing\pool.py", line 241, in _repopulate_pool
    w.start()
  File "C:\Users\talha\AppData\Local\Programs\Python\Python37\lib\multiprocessing\process.py", line 112, in start
    self._popen = self._Popen(self)
  File "C:\Users\talha\AppData\Local\Programs\Python\Python37\lib\multiprocessing\context.py", line 322, in _Popen
    return Popen(process_obj)
  File "C:\Users\talha\AppData\Local\Programs\Python\Python37\lib\multiprocessing\popen_spawn_win32.py", line 89, in __init__
    reduction.dump(process_obj, to_child)
  File "C:\Users\talha\AppData\Local\Programs\Python\Python37\lib\multiprocessing\reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
TypeError: can't pickle _thread.lock objects

Exception in thread Thread-74:
Traceback (most recent call last):
  File "C:\Users\talha\AppData\Local\Programs\Python\Python37\lib\threading.py", line 926, in _bootstrap_inner
    self.run()
  File "C:\Users\talha\AppData\Local\Programs\Python\Python37\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "D:\PyCharmProjects\fer\venv\lib\site-packages\keras\utils\data_utils.py", line 572, in _run
    with closing(self.executor_fn(_SHARED_SEQUENCES)) as executor:
  File "D:\PyCharmProjects\fer\venv\lib\site-packages\keras\utils\data_utils.py", line 554, in <lambda>
    initargs=(seqs,))
  File "C:\Users\talha\AppData\Local\Programs\Python\Python37\lib\multiprocessing\context.py", line 119, in Pool
    context=self.get_context())
  File "C:\Users\talha\AppData\Local\Programs\Python\Python37\lib\multiprocessing\pool.py", line 176, in __init__
    self._repopulate_pool()
  File "C:\Users\talha\AppData\Local\Programs\Python\Python37\lib\multiprocessing\pool.py", line 241, in _repopulate_pool
    w.start()
  File "C:\Users\talha\AppData\Local\Programs\Python\Python37\lib\multiprocessing\process.py", line 112, in start
    self._popen = self._Popen(self)
  File "C:\Users\talha\AppData\Local\Programs\Python\Python37\lib\multiprocessing\context.py", line 322, in _Popen
    return Popen(process_obj)
  File "C:\Users\talha\AppData\Local\Programs\Python\Python37\lib\multiprocessing\popen_spawn_win32.py", line 89, in __init__
    reduction.dump(process_obj, to_child)
  File "C:\Users\talha\AppData\Local\Programs\Python\Python37\lib\multiprocessing\reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
TypeError: can't pickle _thread.lock objects

2019-09-23 22:41:25.141774: F tensorflow/python/lib/core/bfloat16.cc:675] Check failed: PyBfloat16_Type.tp_base != nullptr 

1 Ответ

0 голосов
/ 24 сентября 2019

У меня была такая же проблема.перешел по этой ссылке https://github.com/numpy/numpy/issues/12977

pip uninstall numpy
conda install numpy
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...