Installation Guide#
To use Peridoxia, you will need to first create a virtual environment that uses Python 3.10 and then install the Peridoxia package to this environment using pip. The steps below demonstrate how to complete this process.
It is easiest to install a virtual environment using Anaconda. If you do not have Anaconda, you can download it here: https://www.anaconda.com/download.
To create a new virtual environment in Anaconda, open a terminal window and enter the following code:
conda create -n redox_model python=3.10
This creates a virtual environment named “redox_model” where you can install and run Peridoxia using Python 3.10 without changing your default Python version or settings. To activate this virtual environment, enter the following code into the terminal window:
conda activate redox_model
Once you have activated the environment, you will see the text “(redox_model)” before your command line prompt.
The next step is to install the Peridoxia package using pip. You can do this from your redox_model environment using the following command:
pip install peridoxia
Once you have installed the package, you can access its modules from your redox_model environment. To test your installation, open Python from the command line:
python3
If you have created your virtual environment correctly, you should now have Python 3.10.xx enabled. From here, you can import the package with the following command:
>>> import peridoxia
At this point, you should see a UserWarning about the underlying ThermoEngineLite module. This is fine! You can now test the installation with the following command:
>>> peridoxia.main.ModelRun.test_run()
If everything has been installed correctly, this should perform a simple model run and create a plot.
After Installation#
If you wish to use the model from the command line, you will need to ensure your “redox_model” environment is active each time you wish to use the model. If you don’t see (redox_model) in your command line prompt, you can re-activate the virtual environment with the same activation command:
conda activate redox_model
If you use an IDE, you will need to ensure that you activate your virtual environment in the IDE before importing the Peridoxia package into a project. This process varies based on the IDE. I recommend searching the internet for “<Your_IDE> activate conda environment”.