Ubuntu Linux

Managing Python Versions

To be compatible with bpy (the Blender python interface), pyvale uses python 3.11. To install python 3.11 without corrupting your operating systems python installation first add the deadsnakes repository to apt:

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update && sudo apt upgrade -y

Install python 3.11:

sudo apt install python3.11
sudo apt install python3.11-dev

Add venv to your python 3.11 install:

sudo apt install python3.11-venv

Check your python 3.11 install is working using the following command which should open an interactive python interpreter:

python3.11

If everything has worked you should see an interactive python console with Python 3.11.xx in the header. You can now exit the interpreter using quit().

Virtual Environment

We recommend installing pyvale in a virtual environment using venv or pyvale can be installed into an existing environment of your choice. To create a specific virtual environment for pyvale navigate to the directory you want to install the environment and use:

python3.11 -m venv pyvale-env

Now activate the virtual environment:

source pyvale-env/bin/activate

If you need to activate the environment again in a new terminal use the above command from the directory containing the 'pyvale-env' directory.

Installation from PyPI

pyvale can be installed from PyPI. Ensure you virtual environment is activated (you should see '(pyvale-env)' in your terminal) and run the following from the pyvale directory:

pip install pyvale

You should now be able to start a python 3.11 interpreter in your terminal using (again make sure your pyvale-env is active):

python

Now check that you can import pyvale in the interpreter:

import pyvale

If there are no errors then everything has worked and you can now move on to looking at some of our examples to get you started in the basics section.

Installation from Source

This will only be needed if you want an editable installation of pyvale for most applications users will want to use the PyPI version above.

Clone pyvale to your local system along with submodules using

git clone --recurse-submodules git@github.com:Computer-Aided-Validation-Laboratory/pyvale.git

cd to the root directory of pyvale. Ensure you virtual environment is activated and run the following commmand from the pyvale directory:

pip install -e .
pip install -e ./dependencies/mooseherder

This will create an editable/developer installation of pyvale and mooseherder.