pyreadstat icon indicating copy to clipboard operation
pyreadstat copied to clipboard

Import Error on Mac (Apple M1 Pro): (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')

Open merjekrepo opened this issue 2 years ago • 3 comments

I have Mac and get the following error after trying to compile:

ImportError: dlopen(/Users/fatihshen/Documents/magicstat_venv/lib/python3.10/site-packages/pyreadstat/pyreadstat.cpython-310-darwin.so, 0x0002): tried: '/Users/fatihshen/Documents/magicstat_venv/lib/python3.10/site-packages/pyreadstat/pyreadstat.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/pyreadstat.cpython-310-darwin.so' (no such file)

My Mac environment: MacOS Monterey Version 12.2 Apple M1 Pro

That doesn't give any error on my Windows environment.

I am using PyCharm, with the Python version 3.9.5 in a virtual environment. I run "pip install pyreadstat" command on the terminal to install this package.

My guess is that there should be a pyreadstat version specifically built for M1 chip.

Is this a bug or am I missing something? Any ideas how I can overcome this issue?

merjekrepo avatar Jul 04 '22 11:07 merjekrepo

There are currently no wheels for M1 on pypi, please install with conda.

ofajardo avatar Jul 04 '22 12:07 ofajardo

The issue is currently being tracked here: https://github.com/multi-build/multibuild/issues/457

ofajardo avatar Jul 04 '22 12:07 ofajardo

There are currently no wheels for M1 on pypi, please install with conda.

I understand. Hope there will be one for pypi in near future bc I don't use conda. Thanks.

merjekrepo avatar Jul 04 '22 15:07 merjekrepo

I have uploaded wheels for M1 on pypi. If you test them, please provide feedback.

ofajardo avatar Oct 13 '22 15:10 ofajardo

Yes, it is working @ofajardo

This is really fantastic.

I had to uninstall pyreadstat and reinstall it. Then it worked.

Thanks a lot.

merjekrepo avatar Oct 13 '22 23:10 merjekrepo

Great! Thanks for the feedback!

ofajardo avatar Oct 14 '22 05:10 ofajardo

Thank you so much, this had been causing me a headache!

henrytdsimmons avatar Oct 30 '22 14:10 henrytdsimmons

great! thanks for the nice feedback!

ofajardo avatar Nov 07 '22 10:11 ofajardo