[Python-ideas] Adding Python interpreter info to "pip install"

Al Sweigart asweigart at gmail.com
Thu Jul 19 20:45:20 EDT 2018


 The goal of this idea is to make it easier to find out when someone has
installed packages for the wrong python installation. I'm coming across
quite a few StackOverflow posts and emails where beginners are using pip to
install a package, but then finding they can't import it because they have
multiple python installations and used the wrong pip.

For example, this guy has this problem:
https://stackoverflow.com/questions/37662012/which-pip-is-with-which-python

I'd propose adding a simple line to the output of "pip install" that
changes this:

user at user:~$ pip3 install pyperclip
Collecting pyperclip
Installing collected packages: pyperclip
Successfully installed pyperclip-1.6.2

...to something like this:

user at user:~$ pip3 install pyperclip
Running pip for /usr/bin/python3
Collecting pyperclip
Installing collected packages: pyperclip
Successfully installed pyperclip-1.6.2

This way, when they copy/paste their output to StackOverflow, it'll be
somewhat more obvious to their helper that they used pip for the wrong
python installation.

This info would also be useful for the output of "pip info", but that would
break scripts that reads that output.

Any thoughts?

-Al
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180719/ce67e745/attachment.html>


More information about the Python-ideas mailing list