[Python-ideas] Looking for input to help with the pip situation

Thomas Jollans tjol at tjol.eu
Tue Nov 7 08:04:58 EST 2017


On 2017-11-06 19:04, Michel Desmoulin wrote:
> 
>> I don't see anything particularly bogging here.
>> It's always like this when you have multiple versions of the same
>> software on the system. There's only one PATH, after all.
>>
>> Heck, *the mere fact that Python allows to work like this is already a
>> huge leap forward.* **Doing this cross-platform with exactly the same
>> steps is something few could believe was even possible a couple of years
>> ago!**
> 
> I agree.
> 
>>
>> To simplify things with Python, i do the following:
>> * use the system's Python whenever possible
> 
> So python 2.7 on mac and some linux or none for windows...
> 
>> * if using something else, only install the one version/environment that
>> I'm using day-to-day and add it to PATH (system's if safe & convenient,
>> personal otherwise)
>> * prefer the system's/environment's package manager to pip to install
>> 3rd-party modules, too, if there is one.
> 
> We can't solve the situation perfectly, but we can unify a bit. E.G:
> 
> - provide the "py" command on all OSes to avoid the various naming and
> aliases of python
> - promote it in documentation
> - promote the use of py -x.x -m pip instead of the myriads of alternatives

I'm sure there's a reason why these acrobatics are required on Windows,
but on other OS's separate "python3", "python3.6", "python2",
"python2.7" and "python" executables/symlinks all in the PATH work
perfectly fine.

As Ivan said earlier, perhaps the Windows installers should provide a
"python3" executable, so "python3 -m pip" works everywhere.

I normally use "pip2" and "pip3", but those aren't available everywhere,
and may be hard to support properly.


> - provide an empty pip and venv module. If they are not here, py -m pip
> says "your plateform doesn't provide pip by default, please do xxxxx" to
> install it. With "xxxx" being plateform specific.

Isn't pip installed by default on Windows and OSX? On Linux some
distribution will probably do something unexpected and mess up your
grand plan.

> - check "add python executable to system path" on the windows installer
> once by defaut

I like this, but I have a suspicion that this is rather unorthodox.


-- 
Thomas Jollans


More information about the Python-ideas mailing list