Skip to content

pip 10.0.1 install -e . fails when install.user is set in the config #5317

@anntzer

Description

@anntzer

(setup is nearly a copy-paste of #5085)

  • Pip version: 10.0.1
  • Python version: 3.6
  • Operating system: Arch Linux

Description:

Tried to editably install a local project using pyproject.toml while the install.user key is set in ~/.config/pip/pip.conf. Failed with the traceback below.

What I've run:

$ cat setup.py
from setuptools import setup
setup(name="foobarbaz")

$ cat pyproject.toml
[build-system]
requires = ["setuptools", "wheel"]

$ cat ~/.config/pip/pip.conf
[install]
user = true

$ pip install -e .
Obtaining file:///tmp/foo
  Installing build dependencies ... done
Installing collected packages: foobarbaz
  Found existing installation: foobarbaz 0.0.0
    Can't uninstall 'foobarbaz'. No files were found to uninstall.
  Running setup.py develop for foobarbaz
    Complete output from command /bin/python -c "import setuptools, tokenize;__file__='/tmp/foo/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps --user --prefix=:
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help
    
    error: option --user not recognized
    
    ----------------------------------------
  Can't roll back foobarbaz; was not uninstalled
Command "/bin/python -c "import setuptools, tokenize;__file__='/tmp/foo/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps --user --prefix=" failed with error code 1 in /tmp/foo/

As a side note, note also the spurious error message: Found existing installation: foobarbaz 0.0.0 Can't uninstall 'foobarbaz'. No files were found to uninstall.. There is actually no installation of foobarbaz either in my system or user site packages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: editableEditable installationsC: user schemeHandling of packages in user-specific directoriesauto-lockedOutdated issues that have been locked by automationproject: setuptoolsRelated to setuptoolstype: bugA confirmed bug or unintended behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions