On Mon, Mar 23, 2020 at 08:09:57PM +0100, Oleg Broytman wrote: > On Mon, Mar 23, 2020 at 05:59:41PM -0000, Fr??d??ric De Jaeger > <fdejae...@novaquark.com> wrote: > > The issue is: There is no reliable way to launch a python script. > > > > The command: > > > > python myscript.py > > > > launches python3 on windows and python2 on 99% of the unix market. > > Create and activate a virtual environment (``virtualenv`` or > ``python -m venv``) and always use ``python myscript.py``.
Won't that create a virtual environment using Python3 on Windows and using Python2 most other places, which is exactly the problem Fred is having? Doesn't using a virtual environment require the caller to explicitly activate it, otherwise they will still get the system (global) Python? If Fred successfully creates a virtualenv using the correct version of Python, how does that help him when he distributes his script across his organisation, and to his users? Some of them may not have access to Fred's virtualenv. These are not rhetorical questions. I'm not a heavy virtualenv user and I may not understand it fully. -- Steven _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/NSOQTI6EIYXSUUUKLLR7UT5JG7FVTN5F/ Code of Conduct: http://python.org/psf/codeofconduct/