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
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
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/pip/basecommand.py", line 126, in main
File "/usr/lib64/python2.7/site-packages/pip/commands/install.py", line 228, in run
File "/usr/lib64/python2.7/site-packages/pip/req.py", line 1096, in install
File "/usr/lib64/python2.7/site-packages/pip/req.py", line 482, in uninstall
File "/usr/lib64/python2.7/site-packages/pip/req.py", line 1398, in remove
File "/usr/lib64/python2.7/site-packages/pip/util.py", line 255, in renames
File "/usr/lib64/python2.7/shutil.py", line 299, in move
OSError: [Errno 13] Permission denied: '/usr/bin/fab'
Storing complete log in /home/npinto/.pip/pip.log
Confirmed in develop as issue.
Issue #440 using user site with installed.
This also happens with --target.
fixed in pull #574