How to set up an environment to run the ArcCi Training GUI - CjMoor3/ArcCI-Collab-Repo GitHub Wiki

How to set up environment required to run the ArcCi Training GUI

The ArcCi Training GUI requires a certain set of packages installed on the users environment before the code will run properly. This page contains step by step instructions on how to set up the Python environment required for the ArcCi Training GUI. This tutorial also assumes you already have git and python installed, if you do not have git installed, please visit this page for instructions to install git. If you do not have python installed please visit this page to download python.

If you haven't already, we recommend having the git repository cloned in a directory of your choice. How to clone a git repository

Step 1: Install Anaconda

The package manager we will be using to set up our environment is Anaconda, to install Anaconda go to Anacondas website and install the required installation file for your operating system. If you are having trouble installing Anaconda, this website contains detailed installation instructions for Windows, MacOS, and Linux.

Auto Install

To install the environment and move all required files automatically, a setup.py script has been created. To use this script to automatically setup your environment simply open the command prompt, navigate to the directory of your cloned repository, and run the command python setup.py this will create an environment automatically with the name ArcGUI. To manually select the name for the environment you can use the -n or --name flags when running setup.py, for example python setup.py --name myEnv will create an environment with the name myEnv.

setup.py is currently only supported on Windows and Linux machines

Manual Install

Step 1: Set up environment

To start setting up the environment you will need the environment.yml file from the git repository. Once you have obtained the environment.yml file, open a conda prompt or terminal session and navigate to the directory containing the environment.yml file. Once you have navigated to the directory containing the environment.yml you can create the environment by running the following in your terminal session.

conda env create -f environment.yml

This process may take a while

Now the environment is fully installed, but there is one more step. You must install the environment on ipykernel for the Jupyter notebook to run properly. To do this use the following command.

python -m ipykernel install --user --name ArcGui --display-name "Python (ArcGui)".

Now the environment has been installed on ipykernel.

Step 2: Extracting Cython

Some of the ArcCi Training GUI is coded in Cython, due to this you will need to extract the appropriate compiled Cython code. To extract the Cython code navigate to the environment/ directory, and then navigate to the folder for your respective operating system, currently there is only support for Windows and Linux based machines. Once in the directory for your respective operating system, move all of the contents in to the lib/ directory. For example if you are on Windows, you will navigate to environment/Windows/ and extract the contents from that directory to the lib/ directory.

With that the required files to run the ArcCi Training GUI are in place, just start up your preferred IDE or Jupyter Notebook and run the .ipynb.

Running the Program

To run the program, start by opening the Anaconda prompt, and activate the environment you created by running the following commands.

activate ArcGui and then jupyter notebook

Finally, when prompted with the jupyter notebook home screen, open the file ArcCI_Training_Gui.ipynb, and run all cells.