Debian Bug report logs - #725848
python-pip: default install method for non-root users should be --user

version graph

Package: python-pip; Maintainer for python-pip is Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>; Source for python-pip is src:python-pip (PTS, buildd, popcon).

Reported by: Paul Wise <pabs@debian.org>

Date: Wed, 9 Oct 2013 03:06:02 UTC

Severity: normal

Found in version python-pip/1.4.1-2

Fixed in version python-pip/8.1.2-2

Done: Barry Warsaw <barry@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#725848; Package python-pip. (Wed, 09 Oct 2013 03:06:06 GMT) (full text, mbox, link).


Acknowledgement sent to Paul Wise <pabs@debian.org>:
New Bug report received and forwarded. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Wed, 09 Oct 2013 03:06:06 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Paul Wise <pabs@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: python-pip: default install method for non-root users should be --user
Date: Wed, 09 Oct 2013 11:03:39 +0800
[Message part 1 (text/plain, inline)]
Package: python-pip
Version: 1.4.1-2
Severity: normal

Whenever I run pip install, I get an error about not being able to write
to /usr/local. Since I'm not running pip as root, pip should understand
that I can't write to /usr/local and enable the --user option, which
installs to ~/.local/lib/pythonX.Y/site-packages instead.

pabs@chianamo ~ $ pip install pypump
...
creating /usr/local/lib/python2.7/dist-packages/pypump

    error: could not create '/usr/local/lib/python2.7/dist-packages/pypump': Permission denied

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (700, 'testing'), (600, 'unstable'), (550, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.11-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-pip depends on:
ii  ca-certificates       20130906
ii  python                2.7.5-5
ii  python-pkg-resources  0.6.49-2
ii  python-setuptools     0.6.49-2

Versions of packages python-pip recommends:
ii  build-essential  11.6
pn  python-dev-all   <none>

-- 
bye,
pabs

http://wiki.debian.org/PaulWise
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#725848; Package python-pip. (Fri, 25 Oct 2013 09:27:08 GMT) (full text, mbox, link).


Acknowledgement sent to Ariel <aog2000a@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Fri, 25 Oct 2013 09:27:08 GMT) (full text, mbox, link).


Message #10 received at 725848@bugs.debian.org (full text, mbox, reply):

From: Ariel <aog2000a@gmail.com>
To: 725848@bugs.debian.org
Subject: Re: python-pip: default install method for non-root users should be --user
Date: Fri, 25 Oct 2013 10:52:18 +0200
See also Bug #692108
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=692108

As i said there, python-pip (Debian package) is totally useless as it is: the 
only reasson i'd like to have an extra (Python-)package installer is because 
I'd like to be able to install Python "packages" from the official Python 
package repository (mainly) _AS A USER_, because they are NOT vailable as a 
Debian package.

So i do NOT want to run pip as root, as it would fundamentally mess up my DPKG 
setup (it tries to remove/overwrite system files: e.g.
OSError: [Errno 13] Permission denied: '/usr/bin/easy_install' )

So BOTH  "--user" and a working "--ignore-installed" options (BTW, both 
undocumented in the man page!!) should be the default in Debian.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#725848; Package python-pip. (Tue, 03 Jun 2014 20:45:05 GMT) (full text, mbox, link).


Acknowledgement sent to Barry Warsaw <barry@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>.

Your message did not contain a Subject field. They are recommended and useful because the title of a Bug is determined using this field. Please remember to include a Subject field in your messages in future.

(Tue, 03 Jun 2014 20:45:05 GMT) (full text, mbox, link).


Message #15 received at 725848@bugs.debian.org (full text, mbox, reply):

From: Barry Warsaw <barry@debian.org>
To: 725848@bugs.debian.org
Date: Tue, 3 Jun 2014 16:43:22 -0400
Switching to --user by default is being actively discussed upstream:

https://github.com/pypa/pip/issues/1668

In the meantime, I plan on updating the manpage to describe --user and any
other missing options.



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#725848; Package python-pip. (Tue, 03 Jun 2014 21:09:05 GMT) (full text, mbox, link).


Acknowledgement sent to Scott Kitterman <debian@kitterman.com>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Tue, 03 Jun 2014 21:09:05 GMT) (full text, mbox, link).


Message #20 received at 725848@bugs.debian.org (full text, mbox, reply):

From: Scott Kitterman <debian@kitterman.com>
To: 725848@bugs.debian.org
Subject: Re: [Python-modules-team] Bug#725848: (no subject)
Date: Tue, 03 Jun 2014 17:07:08 -0400
On Tuesday, June 03, 2014 16:43:22 Barry Warsaw wrote:
> Switching to --user by default is being actively discussed upstream:
> 
> https://github.com/pypa/pip/issues/1668
> 
> In the meantime, I plan on updating the manpage to describe --user and any
> other missing options.

Can you go ahead and make --user default in Debian and document that as well?

Scott K



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#725848; Package python-pip. (Mon, 17 Nov 2014 21:51:04 GMT) (full text, mbox, link).


Acknowledgement sent to Donald Stufft <donald@stufft.io>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Mon, 17 Nov 2014 21:51:04 GMT) (full text, mbox, link).


Message #25 received at 725848@bugs.debian.org (full text, mbox, reply):

From: Donald Stufft <donald@stufft.io>
To: 725848@bugs.debian.org
Subject: python-pip: default install method for non-root users should be --user
Date: Mon, 17 Nov 2014 16:47:54 -0500
Please don’t change the default. There is no way in pip to turn that flag *off*
again once it's turned on and any flag added by Debian will be Debian specific
and confuse people. We (pip) plan to make this change on our own at which point
it will then be able to be done in a consistent way.

---
Donald Stufft
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#725848; Package python-pip. (Mon, 17 Nov 2014 22:03:10 GMT) (full text, mbox, link).


Acknowledgement sent to Scott Kitterman <debian@kitterman.com>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Mon, 17 Nov 2014 22:03:10 GMT) (full text, mbox, link).


Message #30 received at 725848@bugs.debian.org (full text, mbox, reply):

From: Scott Kitterman <debian@kitterman.com>
To: 725848@bugs.debian.org
Subject: Re: python-pip: default install method for non-root users should be --user
Date: Mon, 17 Nov 2014 17:02:58 -0500
On Mon, 17 Nov 2014 16:47:54 -0500 Donald Stufft <donald@stufft.io> wrote:
> Please don’t change the default. There is no way in pip to turn that flag 
*off*
> again once it's turned on and any flag added by Debian will be Debian specific
> and confuse people. We (pip) plan to make this change on our own at which 
point
> it will then be able to be done in a consistent way.

If I read you right, if we make --user the default, then pip won't be able to 
muck with system package installation.  I don't see that as a bad thing.

Scott K



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#725848; Package python-pip. (Wed, 10 Feb 2016 15:54:03 GMT) (full text, mbox, link).


Acknowledgement sent to Barry Warsaw <barry@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>.

Your message did not contain a Subject field. They are recommended and useful because the title of a Bug is determined using this field. Please remember to include a Subject field in your messages in future.

(Wed, 10 Feb 2016 15:54:03 GMT) (full text, mbox, link).


Message #35 received at 725848@bugs.debian.org (full text, mbox, reply):

From: Barry Warsaw <barry@debian.org>
To: 725848@bugs.debian.org
Date: Wed, 10 Feb 2016 10:42:10 -0500
Since upstream hasn't changed the default yet, and for understandable reasons
it isn't high on their priority list, and because I'm tired of carrying the
Ubuntu delta that switches to --user by default, I am going to port the Ubuntu
patch to the Debian version.  This will let me resync to Debian and only have
to maintain one version.

Note that Didier's patch does add a --system switch which overrides the
default --user, so I think that should address any usability concerns.

Donald, I appreciate that upstream will do this Right And Better, and once it
does, I'll happily drop this patch.  I agree it kind of sucks that we have to
change upstream's behavior here, but doing so seems like the least worst thing
to do while we wait.



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#725848; Package python-pip. (Wed, 10 Feb 2016 16:45:04 GMT) (full text, mbox, link).


Acknowledgement sent to Donald Stufft <donald@stufft.io>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Wed, 10 Feb 2016 16:45:04 GMT) (full text, mbox, link).


Message #40 received at 725848@bugs.debian.org (full text, mbox, reply):

From: Donald Stufft <donald@stufft.io>
To: Barry Warsaw <barry@debian.org>, 725848@bugs.debian.org
Subject: Re: Bug#725848: (no subject)
Date: Wed, 10 Feb 2016 11:43:42 -0500
[Message part 1 (text/plain, inline)]
> On Feb 10, 2016, at 10:42 AM, Barry Warsaw <barry@debian.org> wrote:
> 
> Since upstream hasn't changed the default yet, and for understandable reasons
> it isn't high on their priority list, and because I'm tired of carrying the
> Ubuntu delta that switches to --user by default, I am going to port the Ubuntu
> patch to the Debian version.  This will let me resync to Debian and only have
> to maintain one version.
> 
> Note that Didier's patch does add a --system switch which overrides the
> default --user, so I think that should address any usability concerns.
> 
> Donald, I appreciate that upstream will do this Right And Better, and once it
> does, I'll happily drop this patch.  I agree it kind of sucks that we have to
> change upstream's behavior here, but doing so seems like the least worst thing
> to do while we wait.
> 

Can we at least ensure that $HOME/.local/bin is on the $PATH by default if you’re
going to do that?


Can the documentation for —system include a note that it is a Debian specific
option? Possibly link to the upstream issue or something?

-----------------
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#725848; Package python-pip. (Wed, 10 Feb 2016 16:54:21 GMT) (full text, mbox, link).


Acknowledgement sent to Barry Warsaw <barry@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Wed, 10 Feb 2016 16:54:21 GMT) (full text, mbox, link).


Message #45 received at 725848@bugs.debian.org (full text, mbox, reply):

From: Barry Warsaw <barry@debian.org>
Cc: 725848@bugs.debian.org
Subject: Re: Bug#725848: (no subject)
Date: Wed, 10 Feb 2016 11:53:05 -0500
[Message part 1 (text/plain, inline)]
On Feb 10, 2016, at 11:43 AM, Donald Stufft wrote:

>Can we at least ensure that $HOME/.local/bin is on the $PATH by default if
>you’re going to do that?

How can we do that?  Not in python-pip certainly.  Users control their own
$PATH so I'm not sure how we can enforce that.  I'm not sure what the Debian
default $PATH is.

>Can the documentation for —system include a note that it is a Debian specific
>option? Possibly link to the upstream issue or something?

Yep, I made sure that the documentation for --user and --system describe that
they are Debian-specific.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#725848; Package python-pip. (Wed, 10 Feb 2016 17:18:07 GMT) (full text, mbox, link).


Acknowledgement sent to Donald Stufft <donald@stufft.io>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Wed, 10 Feb 2016 17:18:07 GMT) (full text, mbox, link).


Message #50 received at 725848@bugs.debian.org (full text, mbox, reply):

From: Donald Stufft <donald@stufft.io>
To: Barry Warsaw <barry@debian.org>, 725848@bugs.debian.org
Subject: Re: Bug#725848: (no subject)
Date: Wed, 10 Feb 2016 11:58:27 -0500
[Message part 1 (text/plain, inline)]
> On Feb 10, 2016, at 11:53 AM, Barry Warsaw <barry@debian.org> wrote:
> 
>> 
>> Can we at least ensure that $HOME/.local/bin is on the $PATH by default if
>> you’re going to do that?
> 
> How can we do that?  Not in python-pip certainly.  Users control their own
> $PATH so I'm not sure how we can enforce that.  I'm not sure what the Debian
> default $PATH is.

I’m not sure! I know Fedora does it… somehow. I think maybe they have a default
skel file that does it? The fact that I don’t (yet) know a good answer to that
question is part of why pip doesn’t do this already :)

I do think you’re going to confuse people though if they go and do something
like ``pip install twine`` and that completes successfully and then they run
``twine`` and it tells them they can’t find the command.

-----------------
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#725848; Package python-pip. (Wed, 13 Apr 2016 07:45:03 GMT) (full text, mbox, link).


Acknowledgement sent to Nathaniel Smith <njs@pobox.com>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Wed, 13 Apr 2016 07:45:04 GMT) (full text, mbox, link).


Message #55 received at 725848@bugs.debian.org (full text, mbox, reply):

From: Nathaniel Smith <njs@pobox.com>
To: 725848@bugs.debian.org
Date: Wed, 13 Apr 2016 00:42:26 -0700
On Fedora, there's a line in /etc/skel/.bash_profile that adds
~/.local/bin to the default PATH. Debian doesn't have an equivalent.

I just filed #820856 to hopefully get this added to Debian.

(It's possible that in the mean time pip might need to grow some logic
to check whether the user's PATH is correct, and even offer to fix it
up by appending something to the user's ~/.something. This is a pretty
significant stumbling block for new users, and even if Debian fixes
this today then it will take quite some time for the change to
propagate out... esp. if the fix goes into /etc/skel, because in that
case existing installations will *never* get the fix, only new ones
will.)

-- 
Nathaniel J. Smith -- https://vorpus.org



Reply sent to Barry Warsaw <barry@debian.org>:
You have taken responsibility. (Mon, 31 Oct 2016 22:51:04 GMT) (full text, mbox, link).


Notification sent to Paul Wise <pabs@debian.org>:
Bug acknowledged by developer. (Mon, 31 Oct 2016 22:51:04 GMT) (full text, mbox, link).


Message #60 received at 725848-done@bugs.debian.org (full text, mbox, reply):

From: Barry Warsaw <barry@debian.org>
To: 725848-done@bugs.debian.org
Date: Mon, 31 Oct 2016 18:47:22 -0400
[Message part 1 (text/plain, inline)]
This has been the case for a long time.  Closing this ancient bug.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#725848; Package python-pip. (Tue, 01 Nov 2016 00:54:03 GMT) (full text, mbox, link).


Acknowledgement sent to Paul Wise <pabs@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Tue, 01 Nov 2016 00:54:03 GMT) (full text, mbox, link).


Message #65 received at 725848@bugs.debian.org (full text, mbox, reply):

From: Paul Wise <pabs@debian.org>
To: Barry Warsaw <barry@debian.org>, 725848@bugs.debian.org
Subject: Re: No Subject
Date: Tue, 01 Nov 2016 08:51:15 +0800
[Message part 1 (text/plain, inline)]
Control: fixed -1 8.1.2-2

On Mon, 2016-10-31 at 18:47 -0400, Barry Warsaw wrote:

> This has been the case...

Please *always* use a versioned -done message for such bugs.

> ... for a long time. Closing this ancient bug.

Looks like it was only fixed in stretch, so not that long/ancient :)

-- 
bye,
pabs

https://wiki.debian.org/PaulWise
[signature.asc (application/pgp-signature, inline)]

Marked as fixed in versions python-pip/8.1.2-2. Request was from Paul Wise <pabs@debian.org> to 725848-submit@bugs.debian.org. (Tue, 01 Nov 2016 00:54:03 GMT) (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 05 Dec 2016 09:31:31 GMT) (full text, mbox, link).


Bug unarchived. Request was from Don Armstrong <don@debian.org> to control@bugs.debian.org. (Wed, 07 Dec 2016 01:36:43 GMT) (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 27 Jan 2017 09:40:41 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Jan 6 11:29:41 2018; Machine Name: beach

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.