μλ ,
#11871κ³Ό μ μ¬ν λ¬Έμ κ° μμ΅λλ€. μ΅κ·Όμ numpy 1.16.0μ μ€μΉνμ§λ§ λ€μ΄κ·Έλ μ΄λν΄μΌ νκ³ μ§κΈ κ³μ ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
λ°κ³ μμ΅λλ€.
μλ μμ λ μΌμ£ΌμΌ μ λ μ μ μ μλνμ΅λλ€.
μ λ μ€μ λ‘ ipyparallel
λ° openbabel
μ μΈνκ³ apt-get
(Ubuntu 18.04.1 LTS)λ₯Ό μ¬μ©νμ¬ λͺ¨λ Python ν¨ν€μ§( μ§μΉ¨ here )λ₯Ό μ κ±°νκ³ νλμ© λ€μ μ€μΉνμ΅λλ€. pip
μ¬μ©νμ¬ μ€μΉλμμ΅λλ€(λ λ€ λ¬Έμ μ κ΄λ ¨μ΄ μλ€κ³ νμ ν©λλ€). μλ μλ μ΄ λͺ¨λ μ 리 _after_ μ€νλμμ΅λλ€.
λ§μ μ¬λλ€μ΄ μ΅κ·Όμ λ€λ₯Έ ν¨ν€μ§μ ν¨κ» μ΄ λ¬Έμ λ₯Ό κ²ͺκ³ μλ κ² κ°μ΅λλ€.
λ€μμ μ€λ₯λ₯Ό 보μ¬μ£Όλ IPython μΈμ μ λλ€.
% ipython3
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
Type "copyright", "credits" or "license" for more information.
IPython 5.5.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: import pandas as pd
In [2]: pd.read_hdf("data.h5")
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-122d644764c1> in <module>()
----> 1 pd.read_hdf("data.h5")
/usr/lib/python3/dist-packages/pandas/io/pytables.py in read_hdf(path_or_buf, key, mode, **kwargs)
368 'contains multiple datasets.')
369 key = candidate_only_group._v_pathname
--> 370 return store.select(key, auto_close=auto_close, **kwargs)
371 except:
372 # if there is an error, close the store
/usr/lib/python3/dist-packages/pandas/io/pytables.py in select(self, key, where, start, stop, columns, iterator, chunksize, auto_close, **kwargs)
715 chunksize=chunksize, auto_close=auto_close)
716
--> 717 return it.get_result()
718
719 def select_as_coordinates(
/usr/lib/python3/dist-packages/pandas/io/pytables.py in get_result(self, coordinates)
1455
1456 # directly return the result
-> 1457 results = self.func(self.start, self.stop, where)
1458 self.close()
1459 return results
/usr/lib/python3/dist-packages/pandas/io/pytables.py in func(_start, _stop, _where)
708 return s.read(start=_start, stop=_stop,
709 where=_where,
--> 710 columns=columns, **kwargs)
711
712 # create the iterator
/usr/lib/python3/dist-packages/pandas/io/pytables.py in read(self, start, stop, **kwargs)
2902 blk_items = self.read_index('block%d_items' % i)
2903 values = self.read_array('block%d_values' % i,
-> 2904 start=_start, stop=_stop)
2905 blk = make_block(values,
2906 placement=items.get_indexer(blk_items))
/usr/lib/python3/dist-packages/pandas/io/pytables.py in read_array(self, key, start, stop)
2457
2458 if isinstance(node, tables.VLArray):
-> 2459 ret = node[0][start:stop]
2460 else:
2461 dtype = getattr(attrs, 'value_type', None)
/usr/lib/python3/dist-packages/tables/vlarray.py in __getitem__(self, key)
669 key += self.nrows
670 (start, stop, step) = self._process_range(key, key + 1, 1)
--> 671 return self.read(start, stop, step)[0]
672 elif isinstance(key, slice):
673 start, stop, step = self._process_range(
/usr/lib/python3/dist-packages/tables/vlarray.py in read(self, start, stop, step)
813 atom = self.atom
814 if not hasattr(atom, 'size'): # it is a pseudo-atom
--> 815 outlistarr = [atom.fromarray(arr) for arr in listarr]
816 else:
817 # Convert the list to the right flavor
/usr/lib/python3/dist-packages/tables/vlarray.py in <listcomp>(.0)
813 atom = self.atom
814 if not hasattr(atom, 'size'): # it is a pseudo-atom
--> 815 outlistarr = [atom.fromarray(arr) for arr in listarr]
816 else:
817 # Convert the list to the right flavor
/usr/lib/python3/dist-packages/tables/atom.py in fromarray(self, array)
1226 if array.size == 0:
1227 return None
-> 1228 return six.moves.cPickle.loads(array.tostring())
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
μΌλΆ κ΄λ ¨ νμΌ λ° λ²μ :
In [4]: import pandas as pd
In [5]: pd.__file__
Out[5]: '/usr/lib/python3/dist-packages/pandas/__init__.py'
In [6]: pd.__version__
Out[6]: '0.22.0'
In [7]: pd.__path__
Out[7]: ['/usr/lib/python3/dist-packages/pandas']
In [8]: import tables
In [9]: tables.__file__
Out[9]: '/usr/lib/python3/dist-packages/tables/__init__.py'
In [10]: tables.__version__
Out[10]: '3.4.2'
In [11]: tables.__path__
Out[11]: ['/usr/lib/python3/dist-packages/tables']
In [12]: import six
In [13]: six.__file__
Out[13]: '/usr/lib/python3/dist-packages/six.py'
In [14]: six.__version__
Out[14]: '1.11.0'
In [15]: six.__path__
Out[15]: []
In [1]: import sys, numpy; print(numpy.__version__, sys.version)
1.13.3 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0]
In [2]: import pandas; pandas.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.7.final.0
python-bits: 64
OS: Linux
OS-release: 4.15.0-43-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8
LOCALE: pt_BR.UTF-8
pandas: 0.22.0
pytest: None
pip: 9.0.1
setuptools: 40.6.3
Cython: None
numpy: 1.13.3
scipy: 0.19.1
pyarrow: None
xarray: None
IPython: 5.5.0
sphinx: None
patsy: 0.4.1+dev
dateutil: 2.6.1
pytz: 2018.3
blosc: None
bottleneck: None
tables: 3.4.2
numexpr: 2.6.4
feather: None
matplotlib: 2.1.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: 4.6.0
html5lib: 0.999999999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
Ubuntu 18.04.1 LTSλ₯Ό μ¬μ©νκ³ μμ΅λλ€.
% uname -a
Linux mothership 4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
#11871μμ @mattipμ λ€μκ³Ό κ°μ΄ μΈκΈνμ΅λλ€.
c-extension λͺ¨λ
_multiarray_umath
μ numpy 1.16.0μ μλ‘μ΄ κΈ°λ₯μ΄λ©° μ΄λκ°μ λ²μ λλ μμ λ²μ μ΄ νΌν©λμ΄ μμμ λνλΌ μ μμ΅λλ€. μ΄ λ¬Έμ λ μ’ λ£λμμ΅λλ€. numpyμ λ¬Έμ κ° μλ€κ³ μκ°λλ©΄ νμ¬ μν μ€μΈ μμ μ λν΄ μμΈν μ€λͺ νλ μ λ¬Έμ λ₯Ό μ¬μμμ€.
numpy 1.13.3μ΄ μλλ°λ μ΄ μ€λ₯κ° λ°μνλ μ΄μ λ 무μμ λκΉ? λͺ¨λ λμμ κ°μ¬λ립λλ€!
numpy 1.13.3μ numpy 1.16μ μ μ₯λ λ°°μ΄μ unpicklingνλ κ² κ°μ΅λλ€.
μ΄κ²μ μ§μ§ λ²κ·Έμ²λΌ 보μ
λλ€. μ΄μ λ²μ κ³Ό νΈνλλλ‘ ndarray.__module__
λ₯Ό μ¬μ μν΄μΌ ν μλ μμ΅λλ€.
@tzickel μ΄ λ§λ€κ³ μκ°ν©λλ€. λ°©κΈ data.h5
λ₯Ό μ²μλΆν° λ€μ μμ±νκ³ (μ΄λ μ€ν¬λ¦½νΈλ₯Ό μ¬μ©ν©λλ€. μ΄λ²μλ νμ€ν numpy 1.13.3μ μ¬μ©ν¨) μμ μ½λκ° μλνμ΅λλ€.
% ipython3
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
Type "copyright", "credits" or "license" for more information.
IPython 5.5.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: import pandas as pd
In [2]: df = pd.read_hdf("data.h5")
In [3]: df.columns
Out[3]:
Index(['aonames', 'atombasis', 'atomcharges', 'atomcoords', 'atommasses',
'atomnos', 'charge', 'coreelectrons', 'enthalpy', 'entropy',
'freeenergy', 'gbasis', 'geotargets', 'geovalues', 'grads', 'homos',
'jobfilename', 'metadata', 'mocoeffs', 'moenergies', 'moments',
'mosyms', 'mult', 'natom', 'nbasis', 'nmo', 'optdone', 'optstatus',
'polarizabilities', 'pressure', 'scfenergies', 'scftargets',
'scfvalues', 'temperature', 'vibdisps', 'vibfreqs', 'vibirs',
'vibsyms'],
dtype='object')
In [4]: df["freeenergy"].head()
Out[4]:
0 -228.614123
1 -229.062884
2 -552.464074
3 -552.010916
4 -552.006776
Name: freeenergy, dtype: float64
λλ κ·Έκ²μ΄ ν΄κ²°λμλ€κ³ μκ°νκΈ° λλ¬Έμ μ΄κ²μ λ«μ΅λλ€. @tzickel κ°μ¬ν©λλ€!
μ΄ μ€λ₯κ° ν΄κ²°λμλ€κ³ μκ°νμ§ μμ΅λλ€. μ λ νΌν΄ νμΌμ μ¬μ©νμ§ μκ³ μλλ° μ΄μ λκ°μ μ€λ₯κ° λ°μν©λλ€.
λ΄ MACμ λͺ κ°μ§ λ³κ²½ μ¬νμ΄ μκΈ° λλ¬Έμ μ΅κ·Όμ μ΄ μ€λ₯κ° λ°μνμ΅λλ€. λͺ¨λ λͺ¨λ² μ¬λ‘λ₯Ό λ°λμ§λ§ μ΄ μ€λ₯λ₯Ό ν΄κ²°ν μ μλ κ² κ°μ΅λλ€.
MAC High Sierra(10.13.6)λ‘ μ κ·Έλ μ΄λ
python 3.6κ³Ό python 3.7μ λͺ¨λ μ€μΉνμ¬ home-brewλ₯Ό μ¬μ©νμ¬ λλν μ€ννκ³ μ¬κΈ°μ μ μλ μ§μΉ¨μ λ°λμ΅λλ€.
https://stackoverflow.com/questions/51726203/installing-python3-6-alongside-python3-7-on-mac
python 3.6.5 λ° κΈ°ν μ¬λ¬ λͺ¨λμ μ¬μ©νλλ‘ μ κ°μ νκ²½μ μ€μ ν©λλ€.
μ΄ μ€λ₯λ κ°μ νκ²½μμ λ°μν©λλ€. λ ΈνΈλΆκ³Ό λͺ λ Ήμ€ νμ΄μ¬ μ½λ λͺ¨λ μ€λ₯λ₯Ό μμ±ν©λλ€. νμ΄μ¬ μ½λλ μ΄ λ©μμ§ μΈμ λ€λ₯Έ μ€λ₯ μμ΄ 100% μ¬λ°λ₯΄κ² μ€νλ©λλ€.
νμ΄μ¬ my_py_file.py
ModuleNotFoundError: 'numpy.core._multiarray_umath'λΌλ λͺ¨λμ΄ μμ΅λλ€.
ModuleNotFoundError: 'numpy.core._multiarray_umath'λΌλ λͺ¨λμ΄ μμ΅λλ€.
ModuleNotFoundError: 'numpy.core._multiarray_umath'λΌλ λͺ¨λμ΄ μμ΅λλ€.
ModuleNotFoundError: 'numpy.core._multiarray_umath'λΌλ λͺ¨λμ΄ μμ΅λλ€.
venvλ₯Ό μμ νκ³ λ€μ μμ±νμ§λ§ μ€λ₯κ° μ§μλ©λλ€. μλ§λ λͺ¨λ μ½λλ λ€λ₯Έ μ€λ₯ μμ΄ κ³μ μ€νλ κ²μ λλ€.
λ€μμ 무μμ ν΄μΌ ν μ§ μ λͺ¨λ₯΄κ² μ΅λλ€. ν΄κ²° λ°©λ²μ΄ μμΌλ©΄ μλ €μ£ΌμΈμ. κ·Έλ μ§ μμΌλ©΄ IMHOκ° μ΄ λ¬Έμ λ₯Ό μ’ λ£ν΄μλ μ λ©λλ€.
μ μ¬ν λ¬Έμ κ° μ¬κΈ°μμ μΆμ λκ³ μμ΅λλ€.
https://github.com/alpacahq/pylivetrader/issues/73
μ°Έκ³ λ‘, λ€μκ³Ό κ°μ΄ numpy λ° pandasλ₯Ό κ°μ λ‘ λ€μ μ€μΉνμ¬ μ΄ λ¬Έμ λ₯Ό ν΄κ²°νμ΅λλ€.
pip install --upgrade --force-reinstall numpy==1.14.5
pip install --upgrade --force-reinstall pandas==0.22.0
λ μ΄μ μ€λ₯ λ©μμ§κ° μμ΅λλ€.
μ΄ λ¬Έμ λ₯Ό ν΄κ²°νμ΅λλ€!
μμΆμ (κ°μ₯ μ΅κ·Ό νΈμΆ λ§μ§λ§):
νμΌ "
νμΌ "/home/vivek/anaconda3/envs/Voiceattn/lib/python3.6/site-packages/numpy/lib/npyio.py", λΌμΈ 421, λ‘λ μ€
pickle_kwargs=pickle_kwargs)
νμΌ "/home/vivek/anaconda3/envs/Voiceattn/lib/python3.6/site-packages/numpy/lib/format.py", 650ν, read_array
λ°°μ΄ = pickle.load(fp, **pickle_kwargs)
ModuleNotFoundError: 'numpy.core._multiarray_umath'λΌλ λͺ¨λμ΄ μμ΅λλ€.
numpy 1.16.0
ν¬λ 0.22.0
ν 18.1 py36_0
νμ΄μ¬ 3.6.8 h0371630_0
λμμ΄ λμκΈ°λ₯Ό λ°λλλ€!
μ΄ λ¬Έμ λ₯Ό ν΄κ²°νμ΅λλ€!
1. I was getting the same issue in numpy.load('myfile.py'):
μμΆμ (κ°μ₯ μ΅κ·Ό νΈμΆ λ§μ§λ§):
νμΌ "", 1ν,
νμΌ "/home/vivek/anaconda3/envs/Voiceattn/lib/python3.6/site-packages/numpy/lib/npyio.py", λΌμΈ 421, λ‘λ μ€
pickle_kwargs=pickle_kwargs)
νμΌ "/home/vivek/anaconda3/envs/Voiceattn/lib/python3.6/site-packages/numpy/lib/format.py", 650ν, read_array
λ°°μ΄ = pickle.load(fp, **pickle_kwargs)
ModuleNotFoundError: 'numpy.core._multiarray_umath'λΌλ λͺ¨λμ΄ μμ΅λλ€.1. Inside an Anaconda virtual env, the following config solved this issue in my case.
numpy 1.16.0
ν¬λ 0.22.0
ν 18.1 py36_0
νμ΄μ¬ 3.6.8 h0371630_01. OS X version: macOS High Sierra v10.13.6
λμμ΄ λμκΈ°λ₯Ό λ°λλλ€!
μ΄ λ¬Έμ κ° λ°μνμ¬ μ μκ²λ λ¬Έμ κ° ν΄κ²°λμμ΅λλ€. κ°μ¬ ν΄μ!
pipλ‘ numpyλ₯Ό μ λ°μ΄νΈνλ©΄ μλν©λλ€.
pip install --upgrade numpy
@mlsmall κ°μ¬ν©λλ€. κ·Έκ²μ λ§μ μ΄λ€.
κ°μ₯ μ μ©ν λκΈ
μ°Έκ³ λ‘, λ€μκ³Ό κ°μ΄ numpy λ° pandasλ₯Ό κ°μ λ‘ λ€μ μ€μΉνμ¬ μ΄ λ¬Έμ λ₯Ό ν΄κ²°νμ΅λλ€.
pip install --upgrade --force-reinstall numpy==1.14.5
pip install --upgrade --force-reinstall pandas==0.22.0
λ μ΄μ μ€λ₯ λ©μμ§κ° μμ΅λλ€.