To install a package in the default environment with a project.toml dependency on your local machine, you can follow these steps:
Pkg
module in Julia to create a new project:using Pkg
Pkg.activate("path/to/project")
Replace "path/to/project" with the path to the directory where you want to create the project.
[deps]
DataFrames = "0.22.5"
Pkg
module:Pkg.instantiate()
This will download and install all the packages listed in the project.toml file.
using Pkg
Pkg.add("PackageName")
Replace "PackageName" with the name of the package you want to install.
using PackageName
# your code here
This should allow you to install and use the package with the specified version in the default environment, while also satisfying the project.toml dependencies for any other packages you may have installed.
Asked: 2023-04-30 11:14:52 +0000
Seen: 10 times
Last updated: Apr 30 '23