Tutorial B: Installing the Seldonian Toolkit libraries
Contents
Toolkit structure
The Seldonian Toolkit consists of two Python libraries and a GUI. The two libraries are the Seldonian Engine library and the Seldonian Experiments library. We recommend always installing the libraries in the same virtual environment. If using the GUI, install that in the same environment as well.
The toolkit is compatible and tested with Python versions 3.8, 3.9, and 3.10. It is incompatible with Python versions lower than version 3.8. We do not plan to support Python versions lower than 3.8, but we do plan to add support for Python version 3.11 soon.
Engine installation
The Seldonian Engine library can be installed with a single line:
This will make the seldonian
package available for you to import in Python. Warnings about scripts not being in PATH can be ignored. To turn off these warnings in the future, one can add --no-warn-script-location
to the pip install command. To test that the install worked, run this command from the command line:
If it worked, there will be nothing printed to the command line. If you get this error:
then make sure that the Python executable you are using to run this command is the same one you used to do the "pip install" command above. You can see the full path of your Python command by running:
on Unix systems or:
on Windows systems. The "gcm" command may work instead of "where" in Powershell.
Experiments installation
The Seldonian Engine library is a dependency of the Seldonian Experiments library. If you know you are planning to use the Experiments library, then you can skip the above steps of installing the Engine because it will be automatically installed when the Experiments library is installed. The Experiments library can be installed with a single line:
This will make the "experiments" package available for you to import in Python. To test that it worked, run this command from the command line:
If it worked, there will be nothing printed to the command line. If you get this error:
then make sure that the Python executable you are using to run this command is the same one you used to do the "pip install" command above. You can see the full path of your Python command by running:
on Unix systems or:
on Windows systems. The "gcm" command may work instead of "where" in Powershell.
GUI installation
First, clone the GUI repo:
This will create a folder called "GUI" wherever you ran the above command. Enter that folder, and run the following from the command line (after entering your virtual environment, if relevant):
The Engine library is one of the requirements of the GUI, so you may seem some output about it already being reinstalled. You can test that the installation worked by running the GUI:
This will start a webserver running at localhost:5001 on your local machine. Go to that address in your browser, and you should see a page like the following: