λ°©κΈ anaconda3μ TensorFlow, Kerasλ₯Ό μ€μΉνμ΅λλ€.
C:\conda create --name neuralnets python=3.7
C:\activate neuralnets
(neuralnets) C:\conda install theano
(neuralnets) C:\conda install mingw libpython
(neuralnets) C:\pip install tensorflow
(neuralnets) C:\pip install keras
μ΄ λͺ λ Ήμ μ€ννμ΅λλ€.
(neuralnets) C:\python -c "from keras import backend; print(backend._BACKEND)"
λ€μ μ€λ₯κ° λ°μνμ΅λλ€.
Traceback (most recent call last):
File "C:\Users\Z0035HPP\AppData\Roaming\Python\Python37\site-packages\numpy\core\__init__.py", line 16, in <module>
from . import multiarray
File "C:\Users\Z0035HPP\AppData\Roaming\Python\Python37\site-packages\numpy\core\multiarray.py", line 12, in <module>
from . import overrides
File "C:\Users\Z0035HPP\AppData\Roaming\Python\Python37\site-packages\numpy\core\overrides.py", line 6, in <module>
from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Z0035HPP\AppData\Local\Continuum\anaconda3\envs\neuralnets\lib\site-packages\keras\__init__.py", line 3, in <module>
from . import utils
File "C:\Users\Z0035HPP\AppData\Local\Continuum\anaconda3\envs\neuralnets\lib\site-packages\keras\utils\__init__.py", line 2, in <module>
from . import np_utils
File "C:\Users\Z0035HPP\AppData\Local\Continuum\anaconda3\envs\neuralnets\lib\site-packages\keras\utils\np_utils.py", line 6, in <module>
import numpy as np
File "C:\Users\Z0035HPP\AppData\Roaming\Python\Python37\site-packages\numpy\__init__.py", line 142, in <module>
from . import core
File "C:\Users\Z0035HPP\AppData\Roaming\Python\Python37\site-packages\numpy\core\__init__.py", line 47, in <module>
raise ImportError(msg)
ImportError:
import numpy as np
<< your code here >>
λκ΅°κ° λμμ£Όμκ² μ΅λκΉ? μ λ kerasμ tensorflowλ₯Ό μ²μ μ¬μ©ν©λλ€. μ΄λ² νκΈ°μ μκ°νλ μμ μ μ¬μ©νκ³ μμ΅λλ€.
κ°μ¬ ν΄μ
ContinuumIO/anaconda-issues# 10628 λ‘ μΈν΄ #12957 μ μ€λ³΅μΌ μ μμ΅λλ€. μ€λ³΅ λ¬Έμ μ λκΈ λ³΅μ¬:
μλμ½λ€μ ν¨κ» μ 곡λλ μΆκ° μ§μ λΌμ΄λΈλ¬λ¦¬μ μμΉμ pip install
μμ μ»λ μ€ν‘ numpyμ ν¨κ» μ 곡λλ λΌμ΄λΈλ¬λ¦¬ μ¬μ΄μλ μ°¨μ΄κ° μμ΅λλ€. μ΄λ₯Ό μν΄μλ PATH
λ³μλ₯Ό μ‘°μ ν΄μΌ ν©λλ€. μλ§λ PATH
μ‘°μ μ΄ κ°μ Έμ€κΈ°μ μ€ν¨νμ μ μμ΅λλ€. site-packages\numpy\.libs
λλ ν λ¦¬κ° μ‘΄μ¬νκ³ μ¬κΈ°μ *.dll
νμΌμ΄ ν¬ν¨λμ΄ μμ΅λκΉ? κ·Έλ λ€λ©΄ pythonμ μ€ννκΈ° μ μ PATH
μμ ν΄λΉ λλ ν 리λ₯Ό μΆκ°ν μ μμ΅λκΉ?
rem This fails
python -c "import numpy"
rem Does this succeed ???
PATH=path\to\site-packages\numpy\.libs;%PATH%
python -c "import numpy"
κ·Έλ¬λ κ·νμ κ²½μ°μλ 무μΈκ°κ° λ€λ¦
λλ€. numpy κ²½λ‘μ κ²½λ‘ κ΅¬λΆ κΈ°νΈκ° μμ΅λλ€. C:\Users\Z0035HPP\AppData\Roaming\Python\Python37\site-packages\numpy\core__init__.py
λ C:\Users\Z0035HPP\AppData\Roaming\Python\Python37\site-packages\numpy\core\__init__.py
μ΄μ΄μΌ ν©λλ€. λ³΅μ¬ λΆμ¬λ£κΈ° μ€λ₯μΈκ°μ?
numpy κ²½λ‘μ κ²½λ‘ κ΅¬λΆ κΈ°νΈκ° μμ΅λλ€.
```
λ‘ κ°μΈλ github νμ λ¬Έμ λ‘ μΈν΄ ν΄κ²°λμμ΅λλ€.
@bsathyan : μ 체 μ€λ₯ λ©μμ§λ₯Ό νμνμ§ μμμ΅λλ€. λ§μ§λ§ ImportError
λ€μ μ€λ λΆλΆλ λΆμ¬λ£μ μ μμ΅λκΉ?
μλμ 첨λΆλ @eric-wieserλ μ 체 μ€λ₯ μ€λ λμ λλ€. λ€λ₯Έ κ²μ΄ νμνλ©΄ μλ €μ£Όμμμ€.
κ°μ¬ ν΄μ :)
(neuralnets) C:\Users\Z0035HPP>python -c "from keras import backend; print(backend._BACKEND)"
Traceback (most recent call last):
File "C:\Users\Z0035HPP\AppData\Roaming\Python\Python37\site-packages\numpy\core\__init__.py", line 16, in <module>
from . import multiarray
File "C:\Users\Z0035HPP\AppData\Roaming\Python\Python37\site-packages\numpy\core\multiarray.py", line 12, in <module>
from . import overrides
File "C:\Users\Z0035HPP\AppData\Roaming\Python\Python37\site-packages\numpy\core\overrides.py", line 6, in <module>
from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Z0035HPP\AppData\Local\Continuum\anaconda3\envs\neuralnets\lib\site-packages\keras\__init__.py", line 3, in <module>
from . import utils
File "C:\Users\Z0035HPP\AppData\Local\Continuum\anaconda3\envs\neuralnets\lib\site-packages\keras\utils\__init__.py", line 2, in <module>
from . import np_utils
File "C:\Users\Z0035HPP\AppData\Local\Continuum\anaconda3\envs\neuralnets\lib\site-packages\keras\utils\np_utils.py", line 6, in <module>
import numpy as np
File "C:\Users\Z0035HPP\AppData\Roaming\Python\Python37\site-packages\numpy\__init__.py", line 142, in <module>
from . import core
File "C:\Users\Z0035HPP\AppData\Roaming\Python\Python37\site-packages\numpy\core\__init__.py", line 47, in <module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
Here is how to proceed:
- If you're working with a numpy git repository, try `git clean -xdf`
(removes all files not under version control) and rebuild numpy.
- If you are simply trying to use the numpy version that you have installed:
your installation is broken - please reinstall numpy.
- If you have already reinstalled and that did not fix the problem, then:
1. Check that you are using the Python you expect (you're using C:\Users\Z0035HPP\AppData\Local\Continuum\anaconda3\envs\neuralnets\python.exe),
and that you have no directories in your PATH or PYTHONPATH that can
interfere with the Python and numpy versions you're trying to use.
2. If (1) looks fine, you can open a new issue at
https://github.com/numpy/numpy/issues. Please include details on:
- how you installed Python
- how you installed numpy
- your operating system
- whether or not you have multiple versions of Python installed
- if you built from source, your compiler versions and ideally a build log
Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.
Original error was: No module named 'numpy.core._multiarray_umath'
λλ λν κ°μ λ¬Έμ μ μ§λ©΄νκ³ μμ΅λλ€.
Traceback (most recent call last):
File "F:\Anaconda\envs\Final_Project\lib\site-packages\numpy\core\__init__.py", line 16, in <module>
from . import multiarray
File "F:\Anaconda\envs\Final_Project\lib\site-packages\numpy\core\multiarray.py", line 12, in <module>
from . import overrides
File "F:\Anaconda\envs\Final_Project\lib\site-packages\numpy\core\overrides.py", line 9, in <module>
from numpy.core._multiarray_umath import add_docstring, ndarray
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:/Python Programs/Final Project/scratch_6.py", line 1, in <module>
import tensorflow as tf
File "F:\Anaconda\envs\Final_Project\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "F:\Anaconda\envs\Final_Project\lib\site-packages\tensorflow\python\__init__.py", line 47, in <module>
import numpy as np
File "F:\Anaconda\envs\Final_Project\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import core
File "F:\Anaconda\envs\Final_Project\lib\site-packages\numpy\core\__init__.py", line 47, in <module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
Here is how to proceed:
- If you're working with a numpy git repository, try `git clean -xdf`
(removes all files not under version control) and rebuild numpy.
- If you are simply trying to use the numpy version that you have installed:
your installation is broken - please reinstall numpy.
- If you have already reinstalled and that did not fix the problem, then:
1. Check that you are using the Python you expect (you're using F:\Anaconda\envs\Final_Project\python.exe),
and that you have no directories in your PATH or PYTHONPATH that can
interfere with the Python and numpy versions you're trying to use.
2. If (1) looks fine, you can open a new issue at
https://github.com/numpy/numpy/issues. Please include details on:
- how you installed Python
- how you installed numpy
- your operating system
- whether or not you have multiple versions of Python installed
- if you built from source, your compiler versions and ideally a build log
Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.
Original error was: DLL load failed: The specified module could not be found.
μ μ
μλμ, κ²½λ‘λ μ΄λ―Έ λμκ² λ§μμ΅λλ€. κ·Έλ¦¬κ³ λ€, μ΄κ²μ μ½λ€μ λ¬Έμ μ λλ€. λμΌν μ½λμ λν΄ κ°μ νκ²½μ μ¬μ©νλλ° κ½€ μ μ€νλμμ΅λλ€. μλμ½λ€μ λκ° λ¬Έμ κ° μλ κ² κ°μ΅λλ€.
pip install tensorflow
PyPIμμ numpyλ₯Ό κ°μ Έμμ΅λλ€. λ
Έλ ₯νλ€
pip uninstall numpy
conda install numpy
κ·Έκ²μ μλ§ μΌμ κ³ μΉ κ²μ λλ€
μλ
νμΈμ,
λλ κ°μ λ¬Έμ μ λΆλͺν pipλ₯Ό μ¬μ©νμ¬ numpyλ₯Ό μ κ±°νκ³ condaλ‘ λ€μ μ€μΉνλΌλ μ‘°μΈμ λ°λμ§λ§ μ±κ³΅νμ§ λͺ»νμ΅λλ€.
κ·Έλ¬λ λ€μ ImportErrorλ‘ tensorboard
λ₯Ό μ€ννλ €κ³ νμ΅λλ€. μ νν κ°μ§λ μμ§λ§ κ΄λ ¨μ΄ μμ μ μμ΅λλ€.
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-02-26 21:41:23.671349: F tensorflow/python/lib/core/bfloat16.cc:675] Check failed: PyBfloat16_Type.tp_base != nullptr
Abort trap: 6
μλ νμΈμ,
λλ κ°μ λ¬Έμ μ λΆλͺν pipλ₯Ό μ¬μ©νμ¬ numpyλ₯Ό μ κ±°νκ³ condaλ‘ λ€μ μ€μΉνλΌλ μ‘°μΈμ λ°λμ§λ§ μ±κ³΅νμ§ λͺ»νμ΅λλ€.
κ·Έλ¬λ λ€μ ImportErrorλ‘tensorboard
λ₯Ό μ€ννλ €κ³ νμ΅λλ€. μ νν κ°μ§λ μμ§λ§ κ΄λ ¨μ΄ μμ μ μμ΅λλ€.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-02-26 21:41:23.671349: F tensorflow/python/lib/core/bfloat16.cc:675] Check failed: PyBfloat16_Type.tp_base != nullptr Abort trap: 6
3.6 νμ΄μ¬μ μ¬μ©νμ¬ tensorlowλ₯Ό μ€ννκ³ μμ΅λκΉ? Tensorflowλ λ¨μν python 3.7μμ μλνμ§ μμ΅λλ€.
λλ λΉμ μ΄ μ΄κ²μ ν κ²μ μ μν©λλ€:
μλ
νμΈμ @mjahmad ,
λ΅μ₯μ λ³΄λ΄ μ£Όμ
μ κ°μ¬ν©λλ€. μ€μ λ‘ λ΄ νκ²½μμ Python 3.6.7
μ μ€ν μ€μ
λλ€.
μκ² μ΅λλ€. μ μ©ν μ λ³΄κ° μμ μ μμΌλ―λ‘ κ³΅μ ν©λλ€.
tensorflow
λ€μ μ κ±°νκ³ 1.12
λ²μ μ ν
μ보λλ§ μ€μΉνμ΅λλ€.
pip install tensorboard==1.12
μ§κΈ μλ
μλ
νμΈμ!
python3.7μ tensorflow μ€μΉμ μ±κ³΅νμ΅λλ€.
ν μ κ±° numpy
ν μ€μΉ numpy
ν μ κ±° ν
μνλ‘
pip μ€μΉ ν
μνλ‘
ν μνλ‘λ₯Ό tfλ‘ κ°μ Έμ€κΈ°
μ±κ³΅ :> κ°μ¬ν©λλ€
pip install tensorflow
PyPIμμ numpyλ₯Ό κ°μ Έμμ΅λλ€. λ Έλ ₯νλ€pip uninstall numpy conda install numpy
κ·Έκ²μ μλ§ μΌμ κ³ μΉ κ²μ λλ€
μ΄κ²μ λ΄ λ¬Έμ λ₯Ό ν΄κ²°νμ΅λλ€. κ°μ¬ν©λλ€.
μλ νμλκΉ,
λλ κ°μ λ¬Έμ κ° μμΌλ©° 3.7 λ° 3.6 νκ²½μμ μλνμ΅λλ€. κ·Έλ¬λ μ¬μ ν λ€μ μ€λ₯κ° μμ΅λλ€.
keras.modelsμμ κ°μ Έμ€κΈ° μμ°¨
TensorFlow λ°±μλ μ¬μ©.
ModuleNotFoundError μΆμ (κ°μ₯ μ΅κ·Ό νΈμΆ λ§μ§λ§)
ModuleNotFoundError: 'numpy.core._multiarray_umath'λΌλ λͺ¨λμ΄ μμ΅λλ€.
!pip uninstall numpy
μλνμ§ μμ΅λλ€. μλ¬΄λ° κ²°κ³Ό μμ΄ μ€νλκ³ μ€νλ©λλ€.κ°μ¬ ν΄μ!
μ’μμ, μ£μ‘ν©λλ€. μ κ° λ¬Έμ λ₯Ό ν΄κ²°νμ΅λλ€. μλ§ λμμ΄ λ κ²μ
λλ€:
numpyμ μ΅μ λ²μ μΌλ‘ μ
λ°μ΄νΈνμμμ€ :D
!pip install --upgrade numpy
μλ
νμΈμ
μ΄ λ©μΌμ 보λ΄μ£Όμ
μ κ°μ¬ν©λλ€.
μ΄λ €μ΄ λ¬Έμ λ₯Ό μλ‘ κ³΅μ ν μ μλλ‘ λμμ£ΌμΈμ.
ν΄λ³΄μ μ€λλ μ’μ ν루 보λ΄μΈμ.
μΈμμ λΉμ μ κ²μ
λλ€. : NS
------μλ³Έ λ©μμ§-----
λ³΄λΈ μ¬λ: "mario" [email protected]
λ°λ μ¬λ: "numpy/numpy" [email protected] ;
μ°Έμ‘°: "kobilinux" [email protected] ; "λκΈ" [email protected] ;
λ³΄λΈ μκ°: 2019-03-14 (λͺ©) 06:21:15 (GMT+09:00)
μ λͺ©: Re: [numpy/numpy] 'numpy.core._multiarray_umath'λΌλ λͺ¨λμ΄ μμ΅λλ€(#12977).
μλ
νμλκΉ,
λλ κ°μ λ¬Έμ κ° μμΌλ©° 3.7 λ° 3.6 νκ²½μμ μλνμ΅λλ€. κ·Έλ¬λ μ¬μ ν λ€μ μ€λ₯κ° μμ΅λλ€.
keras.modelsμμ κ°μ Έμ€κΈ° μμ°¨
TensorFlow λ°±μλ μ¬μ©.
ModuleNotFoundError μΆμ (κ°μ₯ μ΅κ·Ό νΈμΆ λ§μ§λ§)
ModuleNotFoundError: 'numpy.core._multiarray_umath'λΌλ λͺ¨λμ΄ μμ΅λλ€.
!pip μ κ±° numpy
μλνμ§ μμ΅λλ€. μλ¬΄λ° κ²°κ³Ό μμ΄ μ€νλκ³ μ€νλ©λλ€.
κ°μ¬ ν΄μ!
μ’μμ, μ£μ‘ν©λλ€. μ κ° λ¬Έμ λ₯Ό ν΄κ²°νμ΅λλ€. μλ§ λμμ΄ λ κ²μ
λλ€:
numpyμ μ΅μ λ²μ μΌλ‘ μ
λ°μ΄νΈνμμμ€ :D
!pip install --upgrade numpy
β
λΉμ μ΄ λκΈμ λ¬μκΈ° λλ¬Έμ μ΄κ²μ λ°λ κ²μ
λλ€.
μ΄ μ΄λ©μΌμ μ§μ λ΅μ₯νκ±°λ GitHubμμ 보거λ μ€λ λλ₯Ό μμκ±°νμΈμ.
νμ. λ°λΌκ±΄λ μ΄λ¬ν λ¬Έμ κ° Anaconda μΈ‘μμ ν΄κ²°λμμΌλ©° μ¬κΈ°μ μλ μ μ μ€ μΌλΆλ μ°¨μ μ± μΌλ‘ 보μ λλ€. κ°μ₯ μ’μ ν΄κ²°μ± μ
pip uninstall numpy
conda install numpy
μλ νμΈμ!
python3.7μ tensorflow μ€μΉμ μ±κ³΅νμ΅λλ€.
- 첫 λ²μ§Έ μ€μΉ μ€ν¨ λ©μμ§: ModuleNotFoundError: 'numpy.core._multiarray_umath'λΌλ λͺ¨λμ΄ μμ΅λλ€.
- ModuleNotF oundError: 'numpy.core._multiarray_umath'λΌλ λͺ¨λμ΄
ν μ κ±° numpy
ν μ€μΉ numpy
ν μ κ±° ν μνλ‘
pip μ€μΉ ν μνλ‘ν μνλ‘λ₯Ό tfλ‘ κ°μ Έμ€κΈ°
μ±κ³΅ :> κ°μ¬ν©λλ€
μ΄κ²μ λλ₯Ό μν΄ μΌνμ΅λλ€. κ°μ¬ν©λλ€.
μλ
νμλκΉ
λ€μκ³Ό κ°μ΄ tensorflowμ μ‘μΈμ€νλ λμ λμΌν μ€λ₯κ° λ°μν©λλ€.
ModuleNotFoundError μΆμ (κ°μ₯ μ΅κ·Ό νΈμΆ λ§μ§λ§)ModuleNotFoundError: 'numpy.core._multiarray_umath'λΌλ λͺ¨λμ΄ μμ΅λλ€.
μ루μ : - μ΅μ λ²μ μΌλ‘ Numpy μ λ°μ΄νΈ
λ€μκ³Ό κ°μ΄ numpyλ₯Ό μ λ°μ΄νΈνλλ‘ setp
setp1 μ΄κΈ° cmd
setp2 write pip install numpy== μ΅μ λ²μ μ μ
λ ₯νκ³ Enter ν€λ₯Ό λλ¦
λλ€.
μμ pip μ€μΉ numpy==1.16.2
pip install tensorflow
PyPIμμ numpyλ₯Ό κ°μ Έμμ΅λλ€. λ Έλ ₯νλ€pip uninstall numpy conda install numpy
κ·Έκ²μ μλ§ μΌμ κ³ μΉ κ²μ λλ€
μ΄κ²μ μ μκ²λ ν¨κ³Όμ μ΄μμ΅λλ€. tensorflowλ₯Ό μ€μΉνλ pipκ° numpyμ λ λ²μ§Έ λ²μ μ μΆκ°ν κ² κ°μ΅λλ€.
λλ κ°μ μ’ λ₯μ μ€λ₯κ° μμλλ° μλμ½λ€λ₯Ό μ¬μ©νμ¬ κ°μ νκ²½μ λ§λ λ€μ νμν λΌμ΄λΈλ¬λ¦¬λ₯Ό μ€μΉνμ¬ ν΄κ²°νμ΅λλ€.
λλ κ°μ λ¬Έμ κ° μμκ³ μ΄λ»κ² λ μ€ννμ¬ ν΅κ³Όνμ΅λλ€.
```
ν μ κ±° numpy
μ½λ€ μ€μΉ numpy
ν μ€μΉ numpy
μ΄ μ€λ₯λ νΉμ νκ²½μ μ λλ‘ μ€μΉλμ§ μμ μ¬λ¬ ν¨ν€μ§λ‘ μΈν κ² κ°μ΅λλ€. μ μκ² jupyter λ ΈνΈλΆμ ν΄λΉ κ°μ νκ²½μ μ€μΉλμ§ μμμ΅λλ€. λλ μμ μ견μ λ°λλ€.
pip uninstall numpy
conda install numpy
pip install numpy
κ·Έλ° λ€μ λ€μκ³Ό κ°μ΄ μμ νμ΅λλ€.
conda install jupyter
conda install -c conda-forge matplotlib
conda install -c anaconda pandas
μ΄μ νκ²½μμ jupyter λ ΈνΈλΆμ μ΄κ³ λ€μμ μμ±ν©λλ€.
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import tensorflow as tf
μ€λ₯κ° μμ΅λλ€.
κ°μ₯ μ μ©ν λκΈ
pip install tensorflow
PyPIμμ numpyλ₯Ό κ°μ Έμμ΅λλ€. λ Έλ ₯νλ€κ·Έκ²μ μλ§ μΌμ κ³ μΉ κ²μ λλ€