FS#71602 - [python-pandas] Having `python-pyarrow` installed leads to error when importing `pandas`

Attached to Project: Community Packages
Opened by Alex Seiler (aexl) - Saturday, 24 July 2021, 03:05 GMT
Last edited by Jonas Witschel (diabonas) - Tuesday, 02 November 2021, 10:11 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Andrzej Giniewicz (Giniu)
Morten Linderud (Foxboron)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description: With the package `python-pyarrow` installed, I get the following error when I try to import pandas:

import pandas as pd
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-1-7dd3504c366f> in <module>
----> 1 import pandas as pd

/usr/lib/python3.9/site-packages/pandas/__init__.py in <module>
20
21 # numpy compat
---> 22 from pandas.compat import (
23 np_version_under1p18 as _np_version_under1p18,
24 is_numpy_dev as _is_numpy_dev,

/usr/lib/python3.9/site-packages/pandas/compat/__init__.py in <module>
21 np_version_under1p20,
22 )
---> 23 from pandas.compat.pyarrow import (
24 pa_version_under1p0,
25 pa_version_under2p0,

/usr/lib/python3.9/site-packages/pandas/compat/pyarrow.py in <module>
6 import pyarrow as pa
7
----> 8 _pa_version = pa.__version__
9 _palv = Version(_pa_version)
10 pa_version_under1p0 = _palv < Version("1.0.0")

AttributeError: module 'pyarrow' has no attribute '__version__'

Without having `python-pyarrow` installed, it works fine.


Additional info:
* python-pandas version 1.3.0-1
* python-pyarrow version 3.0.0-1


Steps to reproduce: Install both, `python-pandas` and `python-pyarrow` and try to import pandas in a python environment.
This task depends upon

Closed by  Jonas Witschel (diabonas)
Tuesday, 02 November 2021, 10:11 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#70611 
Comment by loqs (loqs) - Saturday, 24 July 2021, 06:25 GMT
python-pyarrow does not supply any .py files specifically need in this case is __init__.py which provides __version__.
Edit:
The attached diff adds the pure python files but also introduces some test failures.
Comment by Phil Schaf (flying-sheep) - Friday, 20 August 2021, 09:17 GMT
Already reported as  FS#70611  in April!

Loading...