piwheels / packages

Issue tracker for piwheels package issues
https://github.com/piwheels/packages/issues
20 stars 5 forks source link

Package issue: Pandas importing Numpy error #408

Open savvn001 opened 10 months ago

savvn001 commented 10 months ago

Package name

Pandas

Package version

2.1.2

PyPI URL

pypi.org/project/pandas

piwheels URL

https://www.piwheels.org/project/pandas/

Python version

I am aware this is the issue tracker for a Python package index specifically for Raspberry Pi

I have checked for duplicate issues

I am the maintainer

More information

Hi,

On RPi OS Bookworm. Made a venv from the system python3.11. Installed Pandas v2.1.2 into this venv. Import is failing for Pandas due to Numpy import error:

  File "mypthonscript.py", line 3, in <module>
    import pandas as pd
  File "myproject/venv/lib/python3.11/site-packages/pandas/__init__.py", line 16, in <module>
    raise ImportError(
ImportError: Unable to import required dependencies:
numpy: Error importing numpy: you should not try to import numpy from
        its source directory; please exit the numpy source tree, and relaunch
        your python interpreter from there.

Tried 2.1.1 and same issue. Cannot try any earlier as not supported on Bookworm.

savvn001 commented 10 months ago

Update, pip install numpy==1.25.2 FIRST before installing latest pandas, and also sudo apt-get install libopenblas-dev solves issue for me for now.