0

So I wanted to have the option of running python 3 or python 2 through my jupyter notebook. So I followed Stack Overflow advice detailed here: Using both Python 2.x and Python 3.x in IPython Notebook

Didn't work:

conda create -n py27 python=2.7 ipykernel
conda create -n py35 python=3.5 ipykernel

This did:

conda create -n py27 python=2.7
source activate py27
conda install notebook ipykernel
ipython kernel install --user`

`conda create -n py35 python=3.5
source activate py35
conda install notebook ipykernel
ipython kernel install --user

but now when I ran import numpy as np I get :

No module named numpy

I checked and I have 3 environments py35, py27 and root and I'm on root. And when I go to the terminal and pip install numpy, it tells me that it's already installed!

Is there anyway that I can use both kernels and have all my packages show. Or at least undo all this. Thanks!

Community
  • 1
  • 1
  • 1
    You don't seem to have installed numpy in either of your two new environments – mdurant Aug 28 '16 at 00:19
  • conda environments are completely isolated from each other. You have to install your packages into each of them separately. To do so, use `conda install -n py27 numpy` and `conda install -n py35 numpy`. If you want to use the full stack of scientific packages, consider using `conda install -n py27 anaconda` – cel Aug 28 '16 at 05:49

0 Answers0