'Installing Julia packages using a .toml file?

I am totally new to Julia!

I would like to install a large number of packages for a project I'm joining.

The project comes with a "Project.toml" file

It seems like there should be a nice way to install all the packages I need for the project, perhaps using the Project.toml file

However, I have not yet found any site that indicates how I might be able to do this.

Could anyone please let me know if what I am doing is possible, and if so, point me to a reference that would show how?



Solution 1:[1]

If your Project.toml is located in a folder, like myproject/Project.toml, you can simply start Julia with julia --project=/path/to/myproject, and it will automatically detect the Project.toml file in myproject.

The first time you activate this project, in the REPL, you can switch to Pkg mode by typing ], and type the command instantiate. This will cause the package manager to download and install all of the packages listed in Project.toml and their dependencies.

Another way to switch between projects during interactive use is to run activate /path/to/myproject in Pkg-mode in the REPL.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Anshul Singhvi