Linux is the preferred OS for these lecture materials, but it is possible to run (most) things on Windows or OS X. Special instructions for each operating system are below.
We skip installing qml
for both Windows and OS X. QML is needed in only one notebook and is difficult to install on operating systems other than Linux.
In all cases, we recommend installing Mamba to build the environment quickly.
First, install Miniconda following Anaconda's instructions.
The next parts require using the command line. See DjangoGirl's excellent tutorial, if needed
Download the repository as a ZIP file or clone it using git then navigate to the folder.
Install Mamba using the command line:
conda install -c conda-forge mamba
Mamba implements all of the features but is much faster. Speed is particularly advantageous given the large and complex environments used in this class.
The environment.yml
file in the root directory is designed for Linux.
To install all of the packages, you will need to install C++ and FORTRAN compilers along with development versions of the LAPACK and BLAS libraries. Many compute clusters (e.g., RCC at UChicago) should have these installed already. If you are using Ubuntu, you can install them with:
sudo apt install build-essential gfortran libblas-dev liblapack-dev
If you cannot install the libraries, remove the qml
and dscribe
libraries from your build environment by adding a "#" to the beginning of the line containing those packages in environment.yml
.
Then, install the environment by calling
mamba env create --file envs/environment-windows.yml --force
The envs/environment-windows.yml
contains an environment with versions of packages that will install properly on Windows.
You will need to install a C++ compiler on Windows to use all of the packages and the preferred route is to use Visual Studio. Make sure to select the "Native Development" option along with the Python development tools.
The only package that requires C++ support is dscribe
, which is used in the "kernel methods" notebooks and related homework assignment. So, if you do not plan to use the kernel methods module then you can exclude dscribe
from the installation by adding a #
to the front of the line containing - dscribe
in environment-windows.yml
.
If you do so, you will not need Visual Studio.
Once you either install Visual Studio or remove the DScribe package, then you can install the environment with:
mamba env create --file envs/environment-windows.yml --force
Under construction
OS X, like Windows and Linux, requires you to install C++ compilers to use all packages in the environment.
Install C++ using the command line tools of XCode. Follow the instructions here: XCode FAQs
The only package that requires C++ support is dscribe
, which is used in the "kernel methods" notebooks and related homework assignment. So, if you do not plan to use the kernel methods module then you can exclude dscribe
from the installation by adding a #
to the front of the line containing - dscribe
in environment-osx.yml
.
If you do so, you will not need XCode.
Once you either install XCode or remove the DScribe package, then you can install the environment with:
mamba env create --file envs/environment-osx.yml --force