3

In a Jupyter Notebook terminal (used from a browser) I created a new conda environment. But when I tried to activate it using:

source activate <env_name>

But I got following error:

/bin/sh: 5: source: not found

I also tried:

activate <env_name>

and

conda activate <env_name>

but both of these approaches haven't worked. I'm using Anaconda 3 on

Distributor ID: Ubuntu 
Release:        16.04 
Codename:       xenial
Marcin Możejko
  • 39,542
  • 10
  • 109
  • 120

1 Answers1

0

I solved this way (your conda.sh could be in a different path). In the same jupyter cell, paste this:

%%bash
source /opt/miniconda/etc/profile.d/conda.sh
conda activate <your_environment_name>
effecor
  • 1,723
  • 1
  • 5
  • 8