Installation#

This page is for those wanting to install BiCEP_GUI locally. For those wanting to use the Earthref JupyterHub site, see JupyterHub Setup.

Pip Environment Setup (Optional)#

NOTE: The steps in this section are optional if you installed the anaconda environment.

If you don’t want to deal with anaconda, and are not on windows, a simple pip virtual environment may be a simpler way to deal with using BiCEP_GUI. You can create a pip virtual environment in the following way, renaming VIRTUAL_ENVIRONMENT_PATH to the name of a directory where you want all of your python packages to be installed:

python3 -m venv VIRTUAL_ENVIRONMENT_PATH

To enter this environment, use the command (again replacing VIRTUAL_ENVIRONMENT_PATH with the folder your environment is located in):

source VIRTUAL_ENVIRONMENT_PATH/bin/activate

This command has to be executed every time you want to use BiCEP GUI, so it may make sense to create an alias for it.

On windows you need to use the command:

py -m venv VIRTUAL_ENVIRONMENT_PATH
VIRTUAL_ENVIRONMENT_PATH\Scripts\activate

However, we highly recommend using conda on Windows.

Installing BiCEP GUI#

BiCEP GUI is installed through pip. If you set up the environment correctly, pip should be on your system already.

BiCEP GUI can either be downloaded using git, or as a zip file from the github page. To clone the repository using git, use the following command.

git clone https://github.com/bcych/BiCEP_GUI.git

Navigate to the BiCEP_GUI folder, and run the following commands:

pip install --upgrade setuptools
pip install ./

Finally, BiCEP_GUI is also dependent on some code from pmagpy. If you do not have an existing developer install of PmagPy

pip install --upgrade pmagpy --no-deps

With this, BiCEP_GUI should be installed

First time launch and Troubleshooting#

In your terminal window, type:

python

This will launch a python prompt. Inside this prompt, type:

import BiCEP

If BiCEP has been installed correctly, you will get a series of messages about “compiling stan models”. This means that BiCEP GUI is creating the underlying C++ models that define the BiCEP method. If you installed through pip you may see messages about downloading and installing cmdstan. If this fails, see the cmdstanpy. documentation for more info.

If everything works, you can begin to use the GUI. To launch, navigate to the BiCEP_GUI folder run the command:

jupyter notebook

Now open the BiCEP_GUI notebook and follow the instructions on the page GUI usage guide. You can also learn more about the deeper workings of the python package at BiCEP Examples Notebook.