Unlike traditional package managers, which install and manage a single global set of packages, Pkg is designed around “environments”: independent sets of packages that can be local to an individual project or shared and selected by name. The exact set of packages and versions in an environment is captured in a manifest file which can be checked into a project repository and tracked in version control, significantly improving reproducibility of projects. If you’ve ever tried to run code you haven’t used in a while only to find that you can’t get anything to work because you’ve updated or uninstalled some of the packages your project was using, you’ll understand the motivation for this approach. In Pkg, since each project maintains its own independent set of package versions, you’ll never have this problem again. Moreover, if you check out a project on a new system, you can simply materialize the environment described by its manifest file and immediately be up and running.
Features
- Since environments are managed and updated independently from each other, “dependency hell” is significantly alleviated in Pkg
- Pkg’s approach to local environments may be familiar to people who have used Python’s virtualenv or Ruby’s bundler
- In Julia, instead of hacking the language’s code loading mechanisms to support environments, we have the benefit that Julia natively understands them
- Pkg is designed to support federated package registries
- Make a fork and then clone the repo locally on your computer
- Use the development version of Pkg.jl