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

Mac (with M2 chip) install of pandas with Poetry #58654

Closed
1 task done
erlebach opened this issue May 9, 2024 · 1 comment
Closed
1 task done

Mac (with M2 chip) install of pandas with Poetry #58654

erlebach opened this issue May 9, 2024 · 1 comment
Labels
Build Library building on various platforms Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@erlebach
Copy link

erlebach commented May 9, 2024

Installation check

Platform

macOS-14.4.1-arm64-arm-64bit

Installation Method

Other

pandas Version

2.2.2

Python Version

3.12.1 (which python)

Installation Logs

Installation with poetry. Pyproject.toml:

[tool.poetry]
name = "copa-data-filtering"
version = "1.0.1"
description = "Use LLM to improve plane maintenance at Copa"
authors = ["Anand Kamble and Gordon Erlebacher"]
readme = "README.md"

[tool.poetry.dependencies]
python = ">=3.10, < 3.13"

Poetry add pandas:

 poetry add pandas
Using version ^2.2.2 for pandas

Updating dependencies
Resolving dependencies... (0.3s)

Package operations: 6 installs, 0 updates, 0 removals

  - Installing six (1.16.0)
  - Installing numpy (1.26.4)
  - Installing python-dateutil (2.9.0.post0)
  - Installing pytz (2024.1)
  - Installing tzdata (2024.1)
  - Installing pandas (2.2.2)

Writing lock file

Execute 'poetry shell':

 poetry shell
Spawning shell within /Users/erlebach/src/2024/copa_data-filtering/.venv
inside .zshrc
(base) ➜  copa_data-filtering emulate bash -c '. /Users/erlebach/src/2024/copa_data-filtering/.venv/bin/activate'

I now run python and import pandas:

 python
Python 3.10.10 (main, Mar 21 2023, 13:41:05) [Clang 14.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/erlebach/src/2024/copa_data-filtering/.venv/lib/python3.10/site-packages/pandas/__init__.py", line 49, in <module>
    from pandas.core.api import (
  File "/Users/erlebach/src/2024/copa_data-filtering/.venv/lib/python3.10/site-packages/pandas/core/api.py", line 1, in <module>
    from pandas._libs import (
  File "/Users/erlebach/src/2024/copa_data-filtering/.venv/lib/python3.10/site-packages/pandas/_libs/__init__.py", line 16, in <module>
    import pandas._libs.pandas_parser  # isort: skip # type: ignore[reportUnusedImport]
ImportError: dlopen(/Users/erlebach/src/2024/copa_data-filtering/.venv/lib/python3.10/site-packages/pandas/_libs/pandas_parser.cpython-310-darwin.so, 0x0002): tried: '/Users/erlebach/src/2024/copa_data-filtering/.venv/lib/python3.10/site-packages/pandas/_libs/pandas_parser.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/erlebach/src/2024/copa_data-filtering/.venv/lib/python3.10/site-packages/pandas/_libs/pandas_parser.cpython-310-darwin.so' (no such file), '/Users/erlebach/src/2024/copa_data-filtering/.venv/lib/python3.10/site-packages/pandas/_libs/pandas_parser.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))

Note the incompatible binary. This has never happened before. The ARM architecture has been around for quite a while already and I assume that there are versions of pandas compatible with ARM?

Any advice is appreciated.

@erlebach erlebach added Build Library building on various platforms Needs Triage Issue that has not been reviewed by a pandas team member labels May 9, 2024
@erlebach erlebach changed the title Mac (with M2 chip) install of pandas with Poery Mac (with M2 chip) install of pandas with Poetry May 9, 2024
@erlebach
Copy link
Author

I'll answer my own question. I got Pandas to work with Python 11.x. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

No branches or pull requests

1 participant