I tried to install the newest version of pip on a Debian Wheezy machine (where I'm not root) but I can't figure out how:
$ pip install --user -I pip
Downloading pip-1.2.1.tar.gz (102Kb): 102Kb downloaded
Running setup.py egg_info for package pip
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.txt' found under directory 'docs/_build'
no previously-included directories found matching 'docs/_build/_sources'
Installing collected packages: pip
Found existing installation: pip 1.1
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 104, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 250, in run
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1129, in install
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 486, in uninstall
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1431, in remove
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 263, in renames
File "/usr/lib/python2.7/shutil.py", line 300, in move
OSError: [Errno 13] Permission denied: '/usr/bin/pip-2.7'
$ curl http://python-distribute.org/distribute_setup.py | python
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 17231 100 17231 0 0 211k 0 --:--:-- --:--:-- --:--:-- 382k
Extracting in /tmp/tmpbAVbrP
Now working in /tmp/tmpbAVbrP/distribute-0.6.32
Before install bootstrap.
Scanning installed packages
Setuptools installation detected at /usr/lib/python2.7/dist-packages
Moving elements out of the way...
/usr/lib/python2.7/dist-packages/setuptools.egg-info already patched.
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
[Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/test-easy-install-5006.pth'
Any ideas / suggestions?
What you're trying to do is probably not supported in your system-installed version of pip: installing a package to a user site that's already installed system-wide is only possible as of 74a4e65 or release 1.2.1. See also #705 and #354.
What I'm trying to find out is, if this is older version preventing me from uninstalling from a custom directory (#746) or if it is something else.
I was able to confirm that --user is not working correctly with --ignore-installed. I'll open a specific ticket for that and close this one.
but, you should be able to do pip install --user pip==1.2.1 and have it work.
pip install --user pip==1.2.1
CORRECTION: I see you're on 1.1 trying to install 1.2.1 to --user. most of the --user fixes happened in 1.2, so I'm not sure what results you'll have with this command.
opened #749 for the --user/--ignore-installed issue
@sebastianw , is your goal to have a pip that can install global packages? if not, then you can use virtualenv to create python virtual environments, that include pip.
I can't use virtualenv for that. We have a common/custom prefix where local software is installed. People add that prefix to their PYTHONPATH (it's added automatically in their .profile). That is where I want to install python packages with pip.