Open In App

Package Management in Julia

Improve
Improve
Like Article
Like
Save
Share
Report

Package in Julia is a project which provides reusable functionality that can be used by other Julia projects via import X or using X. Julia uses Git as a repository for itself and for its package and that the installation has a built-in package manager called pkg.jl. It allows multiple registries managed by different parties to interact smoothly. It handles operations such as installing, removing, and updating packages. But it works only if the package is in Julia’s REPL.

Installation of a Package

If you want to Install a Package in Julia open the Julia Command-Line

Press ], to open the Julia package management environment.

julia> ]

Note:

If you want to know which packages we can install on julia go to this link:

https://juliaobserver.com/packages 

Addition of a Package

If you want to add a package in Julia then use the add command along with the name of the package to be added. Go through the following command:

(@v1.4) pkg> add DecisionTree

Here we have added DecisionTree package in Julia by using the add command. 

Note: It takes about a minute for the installation to complete.

Removing a package

To remove a package from Julia’s environment, use the rm command which is pre-defined in Julia’s library. Go through the following command:

(@v1.4) pkg> rm DecisionTree

Here we have removed the DecisionTree package in Julia by using rm command. By this command, it will remove the package completely form Julia.

Updating a Package

To update all installed packages, use update without any arguments:

(@v1.4) pkg> update

now update DecisionTree with the following command:

(@v1.4) pkg> up DecisionTree

Testing of a Package

To test a package in Julia, the test command can be used in the following format:

(@v1.4) pkg> test DecisionTree

Building a Package

Pre-defined build command can be used to build a package in Julia.

For example, to build flux package, use the following command:

(@v1.4) pkg> build  Flux


Last Updated : 25 Aug, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads