This package automtically create the environment and installs the needed packages when you run the Julia program (assuming “using QuickEnv” is at the top). Julia also has a neat feature of named environments, and QuickEnv search & find such an environment that the program can use to run in, and use it, instead of creating a new environment. So, for example, you can setup a named environment that is sufficient for most of your programs, and QuickEnv would automatically default to using this environment. QuickEnv also has a mechanism for setting up such named environments.
Since the default behavior of QuickEnv is to create a local environment in the current directory, this avoids the natural behavior of over-installing packages in the global environments. For more details, see here:
https://platform.juliahub.com/ui/Packages/General/QuickEnv
Disclaimer:
- The code was written by gemini/agy-cli.
- I think this is useful, but I would not be shocked if somebody came up with a more elegant solution. I just didn’t find it… (My previous solution was to have a different shabang that defaulted to running the program in the current directory environment.)