Broken pip

Michael F. Stemper michael.stemper at gmail.com
Wed Aug 29 15:05:39 EDT 2018


On 2018-08-29 03:10, Thomas Jollans wrote:
> On 2018-08-28 20:10, Michael F. Stemper wrote:
>> I'm trying to upgrade my pip on Ubuntu 16.04. I appear to have
>> buggered things up pretty well. (Details follow) Any suggestions
>> on how to undo this and get everything back to proper operation?
>>
>> Based on the information that I found at:
>> <https://github.com/pypa/pip/issues/3776>, I did the following:
>>
>> user at host$ pip --version
>> pip 9.0.1 from /home/user/.local/lib/python2.7/site-packages (python 2.7)
> 
> Apparently, you did it the "right" way before: installing anything
> system-wide with pip that has already been installed with distribution
> packages is fairly likely to break. Installing a newer pip in your home
> directory should normally work fine.
> 
> Opinions differ, but personally I *never* use "sudo pip": use "pip
> install --user" instead. This installs into ~/.local rather than /usr/local.

I can certainly see a use case for user-specific versions of
modules, and even user-specific presence of modules. For
instance, at school, different researchers might need to have
specific modules for their work. Possibly one person is doing
something with a 3PP built on a specific version of a module
that would be incompatible with a later version.

However, why would I want this on my home servers? It seems to
me that having different versions for different people on my
home network would rapidly become a maintenance problem.

I'm the only one who writes code here. If I was to tell somebody,
"Hey, look at what I wrote," it'd be nice if their environment
had all of the same stuff as mine.

(I realize that you're the messenger, not the designer. It seems
as if my beef is probably with Canonical or even Debian.)

> Also, PLEASE use Python 3. Still using Python 2 today is like still
> using Windows XP in early 2013.

I'm using the default version for the current release of my
OS (Ubuntu 16.04 LTS):

user at host$ ls -lrtd python python?
lrwxrwxrwx 1 root root 9 Nov 22  2016 python3 -> python3.5
lrwxrwxrwx 1 root root 9 Nov 23  2017 python2 -> python2.7
lrwxrwxrwx 1 root root 9 Nov 23  2017 python -> python2.7
user at host$

My understanding is that when I get around to upgrading to 18.04 LTS,
python3 will be the default.

Since I don't hard-code a version in any of my programs, but simply
write "#!/usr/bin/python", all of my programs will automatically change
to the new version then.

If I was to change all of my programs to say "#!/usr/bin/python3", I'd
have a slight head-start. However, then I'd need to change them all
again when python 4 came out. And python 5.

I prefer to maintain version independence, or at least to avoid
implementing version dependence.

-- 
Michael F. Stemper
If you take cranberries and stew them like applesauce they taste much
more like prunes than rhubarb does.



More information about the Python-list mailing list