Skip to content

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

Open
@hoba87

Description

@hoba87

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageIssues that need to be evaluated for severity and status.bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions