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

pyarrow breaks when updating from 15 to 16 #1594

Closed
2 tasks done
visr opened this issue Jul 9, 2024 · 5 comments · Fixed by #1614
Closed
2 tasks done

pyarrow breaks when updating from 15 to 16 #1594

visr opened this issue Jul 9, 2024 · 5 comments · Fixed by #1614
Labels
🐞 bug Something isn't working

Comments

@visr
Copy link

visr commented Jul 9, 2024

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

If I add pyarrow version 15 or 16 to an empty project, either version works fine. If I update from pyarrow 15 to 16 as shown below, pyarrow stops working.

pixi init
pixi add pyarrow=15
pixi run python -c "from pyarrow import array"
# works
pixi add pyarrow=16
pixi run python -c "from pyarrow import array"
# ImportError: cannot import name 'array' from 'pyarrow' (unknown location)

Issue description

I also don't get this issue if I pixi rm pyarrow in between pixi add pyarrow=15 and pixi add pyarrow=16. Both paths lead to identical pixi.lock files with pyarrow 16, but I noticed in the broken project all files under .pixi/envs/default/Lib/site-packages/pyarrow have names like array.pxi__clobber-from-pyarrow-core.

When updating from 16.0 to 16.1, or 16 to 15, there is also no issue.

What I don't know if this is really an issue with pixi or the pyarrow-feedstock.

I use pixi 0.25.0 with:

channels = ["conda-forge"]
platforms = ["win-64"]

Possibly related to #1194.

Expected behavior

I expect pixi run python -c "from pyarrow import array" to work regardless of how I got there.

@visr visr added the 🐞 bug Something isn't working label Jul 9, 2024
@Hofer-Julian
Copy link
Contributor

Hey Martijn 👋🏻

I can reproduce it on my (Linux) machine. No idea yet what is going wrong here, though.

@ruben-arts
Copy link
Contributor

I can reproduce and the issue seems to be with what gets left behind when you update the package.

pixi init
pixi add pyarrow=15
pixi run python -c "from pyarrow import array"
# works
pixi add pyarrow=16
pixi run python -c "from pyarrow import array"
# ImportError: cannot import name 'array' from 'pyarrow' (unknown location)

# Now this works:
pixi clean
pixi run python -c "from pyarrow import array"
# works

Is see that almost everything gets a clobber warning:

Lib\site-packages\pyarrow
❯ ls
╭─────┬──────────────────────────────────────────────────────────────────┬──────┬───────────┬─────╮
│   # │                               name                               │ type │   size    │ ... │
├─────┼──────────────────────────────────────────────────────────────────┼──────┼───────────┼─────┤
│   0 │ __init__.pxd__clobber-from-pyarrow-core                          │ file │   2.1 KiB │ ... │
│   1 │ __init__.py__clobber-from-pyarrow-core                           │ file │  17.4 KiB │ ... │
│   2 │ __pycache__                                                      │ dir  │   8.0 KiB │ ... │
│   3 │ _acero.cp312-win_amd64.pyd__clobber-from-pyarrow-core            │ file │ 198.5 KiB │ ... │
│   4 │ _acero.pxd__clobber-from-pyarrow-core                            │ file │   1.4 KiB │ ... │
│   5 │ _acero.pyx__clobber-from-pyarrow-core                            │ file │  20.8 KiB │ ... │
│   6 │ _azurefs.pyx                                                     │ file │   5.8 KiB │ ... │
│   7 │ _compute.cp312-win_amd64.pyd__clobber-from-pyarrow-core          │ file │ 799.5 KiB │ ... │
│   8 │ _compute.pxd__clobber-from-pyarrow-core                          │ file │   1.9 KiB │ ... │
│   9 │ _compute.pyx__clobber-from-pyarrow-core                          │ file │ 103.7 KiB │ ... │

@baszalmstra
Copy link
Contributor

The reason this happens seems to be that pyarrow=16 introduced a new "sub" package called pyarrow-core. The new pyarrow-core package actually includes all the files previously in pyarrow. This causes a conflict. Ill take a closer look on Thursday!

@ruben-arts
Copy link
Contributor

Ah thanks!

@baszalmstra
Copy link
Contributor

I worked on a fix in conda/rattler#776 which seems to fix this issue!

ruben-arts added a commit that referenced this issue Jul 19, 2024
Among other things:

Fixes #1594 #1609

---------

Co-authored-by: Ruben Arts <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants