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

Closed
sebastianw opened this Issue Dec 12, 2012 · 6 comments

Comments

Projects
None yet
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

This comment has been minimized.

Show comment Hide comment
@kynan

kynan Dec 12, 2012

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.

kynan commented Dec 12, 2012

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

This comment has been minimized.

Show comment Hide comment
@sebastianw

sebastianw Dec 12, 2012

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.

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

This comment has been minimized.

Show comment Hide comment
@qwcode

qwcode Dec 13, 2012

Contributor

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.

Contributor

qwcode commented Dec 13, 2012

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 Dec 13, 2012

@qwcode

This comment has been minimized.

Show comment Hide comment
@qwcode

qwcode Dec 14, 2012

Contributor

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

Contributor

qwcode commented Dec 14, 2012

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

@qwcode

This comment has been minimized.

Show comment Hide comment
@qwcode

qwcode Dec 14, 2012

Contributor

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

Contributor

qwcode commented Dec 14, 2012

@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

This comment has been minimized.

Show comment Hide comment
@sebastianw

sebastianw Dec 14, 2012

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.

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