I may be in the minority, but sometimes it seems like having to spin up a venv, 
etc. to run a small script could be a little bit much. 

What if we have something like this POC I wrote: 
https://pypi.org/project/pyensure/

We could have a switch or python interpreter argument to have packages get 
auto-installed (to a temp directory) in the event that we don't have it 
installed in the current environment. 

One of the beauties of this is that it doesn't pollute the current environment, 
since packages are installed to a temp directory (which is then added to 
sys.path).

Further optimizations (like preventing a need to redownload, import specific 
package versions, or fixing imports that have a dot) could be made in a more 
complete solution.
_______________________________________________
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/T3CNK7GOMI63FE436RCMIE4FZIMLG2UE/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to