Installing with conda#

Prerequisites#

  • The conda package manager must be installed on your computer. It can be installed through Anaconda or Miniconda.

Installation on Linux or macOS#

Step 1: Clone the VaSP repository#

Start by downloading and navigating to the root directory of VaSP with the following command in your terminal:

$ git clone https://github.com/KVSLab/VaSP.git
$ cd VaSP

Step 2: Create a conda environment#

Once you have installed conda, create a new environment for VaSP with all its dependencies using the following command in your terminal:

$ conda env update --file environment.yml --name your_environment

Step 3: Activate the conda environment#

After the configuration of the conda environment is finished, activate the newly created environment by running the following command:

$ conda activate your_environment

Step 4: Install VaSP inside the conda environment using pip#

Finally, you can install the VaSP package inside your environment using pip:

$ python3 -m pip install .

Step 5: Verify the installation#

You can verify that VaSP is installed correctly by downloading the test dependencies, and running the tests using the following commands:

$ python3 -m pip install .[test]
$ python3 -m pytest tests 

Installation on Windows#

We recommend Windows users to use Windows Subsystem for Linux and follow the Linux instructions, or use Docker.

Alternatively, Windows users may install the FEniCS dependency from source, by following the FEniCS Reference Manual. Then, download the remaining dependencies through conda by removing the fenics dependency inside environment.yml and follow the steps of the Linux/macOS installation instructions.

Editable installation of VaSP#

If you want to make changes to any of the scripts included in VaSP, you can install an editable version on your machine by supplying the --editable flag:

$ python3 -m pip install --editable .

The --editable flag installs the project in editable mode meaning that any changes to the original package will be reflected directly in your environment.