Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot import array_record_module on Apple Silicon #44

Open
rpeloff opened this issue Mar 22, 2023 · 2 comments
Open

Cannot import array_record_module on Apple Silicon #44

rpeloff opened this issue Mar 22, 2023 · 2 comments

Comments

@rpeloff
Copy link

rpeloff commented Mar 22, 2023

Hi, I am having trouble using this package on Apple Silicon (M2) due to the shared library file array_record_module.so.

Specifically I have the following error on Python 3.9.16 with array-record==0.2.0:

>>> from array_record.python import array_record_module
ImportError: dlopen(/Users/rp.eloff/.pyenv/versions/test-array-record-py39/lib/python3.9/site-packages/array_record/python/array_record_module.so, 0x0002): tried: '/Users/rp.eloff/.pyenv/versions/test-array-record-py39/lib/python3.9/site-packages/array_record/python/array_record_module.so' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/Users/rp.eloff/.pyenv/versions/test-array-record-py39/lib/python3.9/site-packages/array_record/python/array_record_module.so' (no such file), '/Users/rp.eloff/.pyenv/versions/test-array-record-py39/lib/python3.9/site-packages/array_record/python/array_record_module.so' (not a mach-o file), '/Users/rp.eloff/.pyenv/versions/3.9.16/envs/test-array-record-py39/lib/python3.9/site-packages/array_record/python/array_record_module.so' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/Users/rp.eloff/.pyenv/versions/3.9.16/envs/test-array-record-py39/lib/python3.9/site-packages/array_record/python/array_record_module.so' (no such file), '/Users/rp.eloff/.pyenv/versions/3.9.16/envs/test-array-record-py39/lib/python3.9/site-packages/array_record/python/array_record_module.so' (not a mach-o file)

I assume this is due to array_record_module.so being built for linux. Would it be possible to support Apple Silicon in the build process?

The main motivation for this is that tfds is dependent on array-record since this commit tensorflow/datasets@f2aa83d.

The complete issue:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/rp.eloff/.pyenv/versions/test-array-record-py39/lib/python3.9/site-packages/tensorflow_datasets/__init__.py", line 43, in <module>
    import tensorflow_datasets.core.logging as _tfds_logging
  File "/Users/rp.eloff/.pyenv/versions/test-array-record-py39/lib/python3.9/site-packages/tensorflow_datasets/core/__init__.py", line 22, in <module>
    from tensorflow_datasets.core import community
  File "/Users/rp.eloff/.pyenv/versions/test-array-record-py39/lib/python3.9/site-packages/tensorflow_datasets/core/community/__init__.py", line 18, in <module>
    from tensorflow_datasets.core.community.huggingface_wrapper import mock_builtin_to_use_gfile
  File "/Users/rp.eloff/.pyenv/versions/test-array-record-py39/lib/python3.9/site-packages/tensorflow_datasets/core/community/huggingface_wrapper.py", line 31, in <module>
    from tensorflow_datasets.core import dataset_builder
  File "/Users/rp.eloff/.pyenv/versions/test-array-record-py39/lib/python3.9/site-packages/tensorflow_datasets/core/dataset_builder.py", line 34, in <module>
    from tensorflow_datasets.core import dataset_info
  File "/Users/rp.eloff/.pyenv/versions/test-array-record-py39/lib/python3.9/site-packages/tensorflow_datasets/core/dataset_info.py", line 47, in <module>
    from tensorflow_datasets.core import file_adapters
  File "/Users/rp.eloff/.pyenv/versions/test-array-record-py39/lib/python3.9/site-packages/tensorflow_datasets/core/file_adapters.py", line 29, in <module>
    from array_record.python import array_record_module
ImportError: dlopen(/Users/rp.eloff/.pyenv/versions/test-array-record-py39/lib/python3.9/site-packages/array_record/python/array_record_module.so, 0x0002): tried: '/Users/rp.eloff/.pyenv/versions/test-array-record-py39/lib/python3.9/site-packages/array_record/python/array_record_module.so' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/Users/rp.eloff/.pyenv/versions/test-array-record-py39/lib/python3.9/site-packages/array_record/python/array_record_module.so' (no such file), '/Users/rp.eloff/.pyenv/versions/test-array-record-py39/lib/python3.9/site-packages/array_record/python/array_record_module.so' (not a mach-o file), '/Users/rp.eloff/.pyenv/versions/3.9.16/envs/test-array-record-py39/lib/python3.9/site-packages/array_record/python/array_record_module.so' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/Users/rp.eloff/.pyenv/versions/3.9.16/envs/test-array-record-py39/lib/python3.9/site-packages/array_record/python/array_record_module.so' (no such file), '/Users/rp.eloff/.pyenv/versions/3.9.16/envs/test-array-record-py39/lib/python3.9/site-packages/array_record/python/array_record_module.so' (not a mach-o file)
@nouiz
Copy link

nouiz commented Oct 5, 2023

I think this issue is also related to #71
Mostly, pip install should have failed as M2 are ARM computer to my knowledge.
Maybe there is additional work needed then #71.

@vyeevani
Copy link

vyeevani commented Oct 3, 2024

I've forked and have a release that build the python wheels for array_record here: https://github.com/vyeevani/array_record. Also have a PR on this repo: #118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants