datatable: Mac M1 import error
Mac M1 on BigSur 11.4
Python 3.8.8 on Miniforge Conda environment
DataTable: 1.0.0
Installed via pip install git+https://github.com/h2oai/datatable
Import error:
Traceback (most recent call last):
  File "/Users/zwang/miniforge3/envs/tf24/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3437, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-4-98efda56b751>", line 1, in <module>
    import datatable as dt
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "/Users/zwang/miniforge3/envs/tf24/lib/python3.8/site-packages/datatable/__init__.py", line 23, in <module>
    from .frame import Frame
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "/Users/zwang/miniforge3/envs/tf24/lib/python3.8/site-packages/datatable/frame.py", line 23, in <module>
    from datatable.lib._datatable import Frame
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "/Users/zwang/miniforge3/envs/tf24/lib/python3.8/site-packages/datatable/lib/__init__.py", line 31, in <module>
    from . import _datatable as core
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
ImportError: dlopen(/Users/zwang/miniforge3/envs/tf24/lib/python3.8/site-packages/datatable/lib/_datatable.cpython-38-darwin.so, 2): no suitable image found.  Did find:
	/Users/zwang/miniforge3/envs/tf24/lib/python3.8/site-packages/datatable/lib/_datatable.cpython-38-darwin.so: mach-o, but wrong architecture
	/Users/zwang/miniforge3/envs/tf24/lib/python3.8/site-packages/datatable/lib/_datatable.cpython-38-darwin.so: mach-o, but wrong architecture
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 44 (20 by maintainers)
Just wanted to mention that I’m on an M1 running MacOS 12.2 and @acmilannesta 's workaround (
pip install git+https://github.com/h2oai/datatable) worked for me.In contrast,
pip3 install datatabledidn’t work for me with pip3 version22.0.3. (I got a gendoc error.)@oleksiyskononenko I have some time next week and will start looking into this. Moving to the thread above.
It looks you are using a x86_64 emulated shell session. You need to start an
arm64session witharch -arm64 zshand then do the pip install.I’d love to, but this is complicated by the fact that I do not own nor have access to a mac M1 machine. I’ll see if we can set this up on Travis, but it is not clear if they have mac M1s either.