Session Ready
Exercise

Locking package versions

So far you've noticed that the mortgage_rates project depends on the Python, Pandas, and Statsmodels packages, but we did not specify package versions other than that this project is written for Python version 3.x. This means that running anaconda-project prepare or anaconda-project run the first time will download and install the latest version of each package.

At any time you can request to update all packages using

anaconda-project update

If you were to share this project with another data scientist they will quite likely get different versions of every package when they use it. Especially, if it has been several months since you sent them the package.

Use anaconda-project lock to write the current versions of every package, including low-level dependencies, for the Mac, Linux, and Windows platforms to the anaconda-project-lock.yml file so that other users can exactly recreate the environment as you were using today.

Instructions
100 XP

In the terminal run anaconda-project with the lock argument. You'll notice that exact package versions are printed for Mac, Linux, and Windows.