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

[BUG] editable mode have no precedence over system installed package #3806

Open
hoba87 opened this issue Feb 2, 2023 · 1 comment
Open
Labels
bug Needs Triage Issues that need to be evaluated for severity and status.

Comments

@hoba87
Copy link

hoba87 commented Feb 2, 2023

setuptools version

67.1.0

Python version

3.7

OS

CentOS 8

Additional environment information

No response

Description

Not sure if this is a bug or a problem that can be solved.
However, for my python installation there is a system package dir and a local user dir, where packages are installed. In the system dir there is a package installed at let say version 1.0. In the user directory the package is installed at version 1.2.
With the usual non-editable mode, this is working as expected, that the user installed package takes precedence over the system installed package. But when installed in editable mode in the local user directory, the system installed package takes precedence.

Expected behavior

Editable package installs in local user directory should takes precedence over non-editable system directory installs.

How to Reproduce

cd package_source_1_0
pip install . (as root)
cd package_source_1_2
pip install -e . (as user)

python3
import importlib_metadata
print(importlib_metadata.version(package)

Output

@mnmelo
Copy link

mnmelo commented Nov 30, 2023

As a workaround for my case, I found that installing with either
pip install -e . --config-settings editable_mode=compat
or
pip install -e . --config-settings editable_mode=strict
uses a plain .pth approach that respects expected precedence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Needs Triage Issues that need to be evaluated for severity and status.
Projects
None yet
Development

No branches or pull requests

2 participants