Skip to content

Cannot install into user site directory with editable source. #7953

Open
@agoose77

Description

@agoose77

In build_env.py the environment variable PYTHONNOUSERSITE is set:

'PYTHONNOUSERSITE': '1',

This prevents editable installs with PYTHONUSERBASE=<some-user-base> pip3.8 install --user -e <some-file-path> from succeeding if the user does not have write access to the base-Python site-packages directory.

This is a snapshot of the error.

running develop
    WARNING: The user site-packages directory is disabled.
    error: can't create or remove files in install directory

It may be that it is a deliberate design choice to disable editable installs under a user site directory. I personally needed this feature, however, and I am therefore setting site.ENABLE_USER_SITE = True in setup.py as a workaround.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: PEP 517 impactAffected by PEP 517 processingC: build logicStuff related to metadata generation / wheel generationC: editableEditable installationsC: user schemeHandling of packages in user-specific directoriestype: bugA confirmed bug or unintended behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions