Install motbxtools and use example notebooks#

Several Jupyter notebooks using the motbxtools Python library are provided as part of the MOTBX GitHub repository. We make use of Conda for cross-platform package management.

Install Conda environment#

  1. Install Miniconda3 (Conda 23.5.2 Python 3.11.3 released July 13, 2023).

  2. Install dependencies

    1. Option 1: install environment from YAML environment file

      conda env create -f envs/motbxtools_notebooks.yml
      conda activate motbxtools_notebooks
      pip install -e .
      
    2. Option 2: install dependencies manually using Miniconda/Anaconda Prompt or terminal

      1. Install notebook and Jupyter kernels (nb_conda_kernels) to Conda base environment:

        conda install -c conda-forge notebook
        conda install -c conda-forge nb_conda_kernels
        
      2. Create new environment and register kernel for Jupyter:

        conda create -n motbxtools_notebooks python=3.11
        conda activate motbxtools_notebooks
        conda install ipykernel
        python -m ipykernel install --user --name=motbxtools_notebooks --display-name "Python 3.11 (motbxtools_notebooks)"
        conda install -c anaconda requests
        conda install -c conda-forge pyyaml
        conda install -c conda-forge jsonschema
        conda install -c conda-forge validators
        conda install -c conda-forge pygithub
        conda install -c conda-forge keyring
        conda install -c anaconda pandas
        conda install -c conda-forge openpyxl
        pip install -e .
        

Run Jupyter#

Jupyter can now be started from the base environment:

jupyter notebook

This opens Jupyter in your default browser. Select a notebook from the notebooks folder to open it.

Example Jupyter Notebooks#

A set of Jupyter notebooks showcase how motbxtools can be used to create/modify the MOTBX resource schema and validate resources. Make sure to run them from the notebooks directory.