Documentation is under construction. Please use examples as the main reference.

Setup Python Environment#

Note

The following instruction is mainly based on the developers’ machine (Windows 10 and CentOS Linux 7). Some steps and commands could be different for your machine, especially for Linux. If your machine is maintained by your IT department, you can ask them for help.

There are many ways to setup a Python environment. As long as the prerequisites for Python (Prerequisites) are met, you can do this in your own way.

It is highly recommended to create a local virtual Python environment and run iVABS in it. The benefit is that the virtual environment is completely in the control of the local user and won’t affect and be affected by the global environment.

Install Python#

The recommended way to setup a virtual environment is through Anaconda. Follow the official instructions for installation: https://conda.io/projects/conda/en/latest/user-guide/install/index.html.

Note

For Linux, depending on the system configuration and package management, you may need to load the anaconda module before using it the first time:

module load anaconda

Create virtual environment#

To create a virtual environment named py3ivabs with Python 3.9, run

conda create --name py3ivabs python=3.9

To switch to the new virtual environment, run

conda activate py3ivabs

If this is your first time activating this environment, you may some error message printed. Follow the instruction in that message to configure your shell. More instructions can be found in the official documentation: https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment.

Then the command prompt should be something like:

(py3ivabs) C:\Users\user_name>
(py3ivabs) user_name@machine_name: ~$

Note

Remember to activate the virtual environment every time you open a new terminal or command prompt window to run iVABS.

Install dependencies#

To install all the required packages at once:

pip install -r <IVABS_ROOT>/scripts/requirements.txt

To install the packages listed in Prerequisites one by one

pip install <package-name>

To install the packages listed in Prerequisites one by one

conda install <package-name>