If you enjoy working with Jupyter Notebooks/Lab or JupyterAI, you can use this template to easily set up your virtual environment.

Setting Up LlamaIndex and Jupyter-AI with Conda
Here's how to set up LlamaIndex and Jupyter-AI using Conda, with a touch of pip to install the langchain-ollama package, which isn't available through Conda (see: langchain-ollama on Anaconda).

# install conda
mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm ~/miniconda3/miniconda.sh
# Activate Conda (adjust the path if necessary)
source ~/miniconda3/bin/activate

# Create a new Conda environment with LlamaIndex and Jupyter-AI from conda-forge
conda create -n llama-index -c conda-forge llama-index jupyter-ai

# Activate the newly created Conda environment
conda activate llama-index

# Install the langchain-ollama package using pip (not available via Conda)
pip install langchain-ollama==0.1.0

Now you’re all set! Enjoy working in your new environment.🚀

# Launch JupyterLab for interactive development and AI integration
jupyter lab

Previous Post Next Post