On Linux, put this into a file, chmod +x it, and execute. The first time it will take a while (downloading and compiling packages). After that on my crappy laptop it takes:
0.66user 0.06system 0:01.25elapsed 57%CPU
That is a lot more convenient than venv in Python.
However, you can write scripts which pull in packages from the internet called "single-file packages": https://dub.pm/advanced_usage
Just tried it myself for the first time:
On Linux, put this into a file, chmod +x it, and execute. The first time it will take a while (downloading and compiling packages). After that on my crappy laptop it takes: That is a lot more convenient than venv in Python.