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

pip install -e --user is not resolved #11788

Closed
1 task done
12rambau opened this issue Feb 9, 2023 · 2 comments
Closed
1 task done

pip install -e --user is not resolved #11788

12rambau opened this issue Feb 9, 2023 · 2 comments
Labels
resolution: wrong project Should be reported elsewhere

Comments

@12rambau
Copy link

12rambau commented Feb 9, 2023

Description

A packages installed with pip install --user -e is then not resolved from python when importing it in a python script. I reported this issue first in jupyterlab/jupyterlab#13867 (comment) but it seems related to the installation process itself.

Expected behavior

I would expect the editable installation from my user directory to have priority on any other

pip version

22.3.1

Python version

3.8.1

OS

Ubuntu focal

How to Reproduce

from my terminal I run:

git clone git@github.com:pydata/numexpr.git
pip install -e --user numexpr

In my local folder, I find the following:

.local/
└── lib/
    └── python3.8/
        └── site-packages/
            ├── numexpr-2.8.5.dev1.dist-info/
            ├── __editable___numexpr_2_8_5_dev1_finder.py
            └── __editable___numexpr_2_8_5_dev1_finder.py

Now from a python interface, I execute the following commands:

import numexpr
numexpr.__version__

which give me 2.7.1 which is not version I installed in editable mode.

But from the terminal, it returns the correct version.

$ pip show numexpr

Version: 2.8.5.dev1

Output

No response

Code of Conduct

@12rambau 12rambau added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Feb 9, 2023
@uranusjr
Copy link
Member

The numexpr project dynamically generates the version file on build with a custom script in seutp.py. pip does not intefere with the code, and you need to discuss with the said project why the mechanism does not work as you expect.

@uranusjr uranusjr closed this as not planned Won't fix, can't repro, duplicate, stale Feb 10, 2023
@uranusjr uranusjr added resolution: wrong project Should be reported elsewhere and removed type: bug A confirmed bug or unintended behavior S: needs triage Issues/PRs that need to be triaged labels Feb 10, 2023
@12rambau
Copy link
Author

numexpr was a dummy example, the initial problem was coming from a lib I created myself. Using a more robust lib (like numexpr) was a way to avoid the "you made a mistake in your config issue".

Thanks to another thread (microsoft/pylance-release#78) I finally understand the issue:
setuptools recently added support for PEP660 which seems unsupported by my environment.
running pip install -e . --config-settings editable_mode=compat as suggested in setuptool documentation solved it.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: wrong project Should be reported elsewhere
Projects
None yet
Development

No branches or pull requests

2 participants