[
https://issues.apache.org/jira/browse/ARROW-13657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17550644#comment-17550644
]
Will Jones commented on ARROW-13657:
------------------------------------
This is not a bug; Flight is not shipped in all versions of the wheel. You will
also get an import error if you attempt to import pyarrow.gandiva, which is
also an optional feature. It is turned off for arm64 MacOS here:
[https://github.com/apache/arrow/blob/8f0ddc785dd72e950b570f3bc380deb15c124c45/dev/tasks/python-wheels/github.osx.arm64.yml#L26]
The Conda-packaged pyarrow has Flight and other optional features enabled. As a
workaround, you can either install through conda, or built a custom wheel with
the components you want.
If you think this should be added to the wheel, you are welcome to open a
feature request/or re-classify this as one.
> [Python] No module named 'pyarrow._flight' (MacOS)
> --------------------------------------------------
>
> Key: ARROW-13657
> URL: https://issues.apache.org/jira/browse/ARROW-13657
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Affects Versions: 5.0.0
> Environment: Device: Macbook Air M1 2020 (MacOS Big Sur 11.5.1)
> Python version: Python 3.9.4
> Arrow version: 5.0.0
> Reporter: Dinh Long Nguyen
> Priority: Major
>
> ModuleNotFoundError: No module named 'pyarrow._flight'
> *Error Detail:*
> Traceback (most recent call last):
> File "arrowtest1/backend/server.py", line 4, in <module>
> import pyarrow.flight as fl
> File
> ".local/share/virtualenvs/backend-OiVOEXti/lib/python3.9/site-packages/pyarrow/flight.py",
> line 18, in <module>
> from pyarrow._flight import ( # noqa:F401
> ModuleNotFoundError: No module named 'pyarrow._flight'
> *Device*: Macbook Air M1 2020 (MacOS Big Sur 11.5.1)
> *Python version:* Python 3.9.4
> *Arrow version:* 5.0.0
> *Description*
> Pyarrow works fine, can import other component such as pyarrow.orc, but not
> pyarrow.flight
> Tried out several machines (intel 4790k, ubuntu), can import pyarrow.flight
> no problem.
> Even tried out VSCode Dev Container on the same macbook, can also import
> flight no problem.
> But I cant import when used pipenv directly within macos (I mean no
> container).
> *Replication process:*
> pipenv install pyarrow
> python
> >> import pyarrow.flight
> Then the error occured
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)