Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

pip install --user tries to uninstall system package #440

Closed
npinto opened this Issue · 3 comments

4 participants

@npinto

I'm trying to install a package into my $PYTHONUSERBASE (see PEP370) using --user but since my system already has an older version pip is trying to uninstall the system version and fails.

$ pip install --no-deps --user git+https://github.com/fabric/fabric.git
Downloading/unpacking git+https://github.com/fabric/fabric.git
  Cloning https://github.com/fabric/fabric.git to /tmp/pip-hmaLKb-build
  Running setup.py egg_info for package from git+https://github.com/fabric/fabric.git

    warning: no previously-included files matching '*' found under directory 'docs/_build'
    warning: no files found matching 'fabfile.py'
Installing collected packages: Fabric
  Found existing installation: Fabric 1.3.3
    Uninstalling Fabric:
Exception:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/pip/basecommand.py", line 126, in main
    self.run(options, args)
  File "/usr/lib64/python2.7/site-packages/pip/commands/install.py", line 228, in run
    requirement_set.install(install_options, global_options)
  File "/usr/lib64/python2.7/site-packages/pip/req.py", line 1096, in install
    requirement.uninstall(auto_confirm=True)
  File "/usr/lib64/python2.7/site-packages/pip/req.py", line 482, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/usr/lib64/python2.7/site-packages/pip/req.py", line 1398, in remove
    renames(path, new_path)
  File "/usr/lib64/python2.7/site-packages/pip/util.py", line 255, in renames
    shutil.move(old, new)
  File "/usr/lib64/python2.7/shutil.py", line 299, in move
    os.unlink(src)
OSError: [Errno 13] Permission denied: '/usr/bin/fab'

Storing complete log in /home/npinto/.pip/pip.log
@pnasrat pnasrat was assigned
@pnasrat
Owner

Confirmed in develop as issue.

@pnasrat pnasrat referenced this issue from a commit in pnasrat/pip
@pnasrat pnasrat Issue #440 using user site with installed. 7735e33
@oremj

This also happens with --target.

@qwcode
Owner

fixed in pull #574

@qwcode qwcode closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.