Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Unable to locally install newest version of pip on Debian Wheezy #745

Closed
sebastianw opened this Issue · 6 comments

3 participants

@sebastianw

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/unpacking 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
Uninstalling pip:
Exception:
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
requirement_set.install(install_options, global_options)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1129, in install
requirement.uninstall(auto_confirm=True)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 486, in uninstall
paths_to_remove.remove(auto_confirm)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1431, in remove
renames(path, new_path)
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 263, in renames
shutil.move(old, new)
File "/usr/lib/python2.7/shutil.py", line 300, in move
os.unlink(src)
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
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.32.tar.gz
Extracting in /tmp/tmpbAVbrP
Now working in /tmp/tmpbAVbrP/distribute-0.6.32
Installing Distribute
Before install bootstrap.
Scanning installed packages
Setuptools installation detected at /usr/lib/python2.7/dist-packages
Non-egg installation
Moving elements out of the way...
Already patched.
/usr/lib/python2.7/dist-packages/setuptools.egg-info already patched.
running install
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
installation directory:

[Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/test-easy-install-5006.pth'

Any ideas / suggestions?

@kynan

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.

@sebastianw

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.

@qwcode
Owner

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.

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.

@qwcode qwcode closed this
@qwcode
Owner

opened #749 for the --user/--ignore-installed issue

@qwcode
Owner

@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.

@sebastianw

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.

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.