Adding a Conda Environment to Jupyter Notebook
We will show you how easy it is to create a conda environment and adding it to your Jupyter notebook.
If you haven't launched a Jupyter notebook on RONIN, you'll want to read the Accessing a Jupyter notebook with RONIN on how to do so before returning here
I have created and launched my Jupyter notebook already, let's get started!
Step 1 - Open a terminal window through RONIN Link
Step 2 - Update to the latest Conda
conda update -n base -c defaults condaStep 3 - Create your Conda environment. In this example I've called it myenv
conda create -n myenvStep 4 - Activate your Conda environment
You may need to define your shell. In this example I've used bash.
conda init bashClose and re-open your current shell to save the above changes. Then run the below code to activate your environment.
conda activate myenvYou can install required packages you want in this environment.
Step 5 - Now comes the step to set this Conda environment on your jupyter notebook, to do so install ipykernel.
pip install --user ipykernel Step 6 - Activate your Conda environment
python -m ipykernel install --user --name=myenvYes!!! You now have connected your virtual environment to your Jupyter machine.
