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

install location not inside site-packages #374

Closed
wingkitlee0 opened this issue May 27, 2024 · 5 comments
Closed

install location not inside site-packages #374

wingkitlee0 opened this issue May 27, 2024 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@wingkitlee0
Copy link

wingkitlee0 commented May 27, 2024

I noticed that h3-py was not installed correctly into the site-packages/, which causes a bunch of h3-related source files in a "root" python folder. This happened when I tried to remove packages (pip uninstall h3):

Found existing installation: h3 3.7.7
Uninstalling h3-3.7.7:
  Would remove:
    /home/wklee/.pyenv/versions/3.12.2/envs/py312/CHANGELOG.md
    /home/wklee/.pyenv/versions/3.12.2/envs/py312/CMakeLists.txt
    /home/wklee/.pyenv/versions/3.12.2/envs/py312/LICENSE
    /home/wklee/.pyenv/versions/3.12.2/envs/py312/include/h3/h3api.h
    /home/wklee/.pyenv/versions/3.12.2/envs/py312/lib/cmake/h3/h3Config.cmake
...

However, other packages (e.g., pip uninstall numpy) give

Found existing installation: numpy 1.26.4
Uninstalling numpy-1.26.4:
  Would remove:
    /home/wklee/.pyenv/versions/3.12.2/envs/py312/bin/f2py
    /home/wklee/.pyenv/versions/3.12.2/envs/py312/lib/python3.12/site-packages/numpy-1.26.4.dist-info/*
    /home/wklee/.pyenv/versions/3.12.2/envs/py312/lib/python3.12/site-packages/numpy.libs/libgfortran-040039e1.so.5.0.0
    /home/wklee/.pyenv/versions/3.12.2/envs/py312/lib/python3.12/site-packages/numpy.libs/libopenblas64_p-r0-0cf96a72.3.23.dev.so
    /home/wklee/.pyenv/versions/3.12.2/envs/py312/lib/python3.12/site-packages/numpy.libs/libquadmath-96973f99.so.0.0.0
    /home/wklee/.pyenv/versions/3.12.2/envs/py312/lib/python3.12/site-packages/numpy/*

I tried this on different environments, including my windows env and still see it..

@ajfriend
Copy link
Contributor

Hmmm, good catch @wingkitlee0. That's weird. Off the top of my head, I'm not sure why that's happening, but it does seem wrong.

I can try to take a look when I have time, but I'd be more than happy if anyone else looks into this in the meantime. :)

@ajfriend ajfriend added the help wanted Extra attention is needed label May 27, 2024
@wingkitlee0
Copy link
Author

This is an old bug in skbuild related to MANIFEST.in.
scikit-build/scikit-build#680
which seems to be not fixed fully (PR was reverted)

In other packages, they simply use package_data directly: Qiskit/qiskit-aer#1677

P.S. I noticed this when I was trying to grab the h3api.h ..

@ajfriend
Copy link
Contributor

Nice. Would you be willing to put up a PR to fix?

In the long term, I think we could also try to modernize the build, as in #340

@wingkitlee0
Copy link
Author

Sure, I can try.

@wingkitlee0
Copy link
Author

I believe this is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants