[Python-ideas] Looking for input to help with the pip situation
desmoulinmichel at gmail.com
Sun Nov 12 01:20:38 EST 2017
Le 10/11/2017 à 09:01, Nick Coghlan a écrit :
> On 10 November 2017 at 17:05, Michel Desmoulin
> <desmoulinmichel at gmail.com> wrote:
>>> Which is why we advise getting into a virtual environment ASAP, such
>>> that the only platform specific thing folks necessarily need to learn
>>> to get started is how to get to that first working virtual
>> You can't start by teaching virtualenv. I tried. It doesn't work. And
>> it's a terrible prerequisit if you write docs, tutorial, teaching
>> materials, etc.
> You can't have it both ways - the only way we can systematically mask
> the environmental differences between Windows, Linux and Mac OS X is
> by providing tooling that actually masks those differences, which
> means introducing that tooling becomes a prerequisite for teaching.
> It doesn't completely solve the problem (as getting into and out of
> the environment is still platform specific), but it does mean that the
> ubiquitous online instructions to run "pip install package-name" and
> "python -m command" will actually work once people are inside their
> working environment.
> That tooling is venv:
> * it ensures you have "pip" on your PATH
> * it ensures you have "python" on your PATH
> * it ensures that you have the required permissions to install new packages
> * it ensures that any commands you install from PyPI will be also on your PATH
> When we choose not to use venv, then it becomes necessary to ensure
> each of those things individually for each potential system starting
The way we do things is not the only way. Take JS: they don't have this
problem, you npm install the same way everywhere. You don't have
virtualenv but local node_modules. And you have transpilers to help with
the langage version differences.
Now I'm not advocating we do it the JS way. I'm just saying that you are
very keen to defend a statu quo instead of offering ideas to solve the
Besides, using venv have the same issues. It's not installed on linux by
defaut. And on windows you'll have to do py -x.x -m but on mac pythonx -m.
More information about the Python-ideas