0

I am using jupyter notebook with anaconda3 package but I want to use jupyter with anaconda2 and the package I have already installed! how can I add anaconda2 to jupyter kernel?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Hoda Fakharzadeh
  • 697
  • 3
  • 7
  • 18
  • Search your question before asking. Here you are you can find your answer from there http://stackoverflow.com/questions/24405561/how-to-install-2-anacondas-python-2-7-and-3-4-on-mac-os-10-9/42475529#42475529 – Axis Mar 12 '17 at 10:30

2 Answers2

0

you will first have to create both a python 2 environment in anaconda, since it seems your default environment is in python 3.

conda create --name python2Env python=2

You can list your environments to make sure that you have one with python 2 and one with python 3.

conda info --envs

If you're successful, you will see two environments: the one you just created, and your original in python 3.

Now when you launch the jupyter notebook, you will have the option to create a new notebook in the new python 2 environment!

user2118915
  • 532
  • 6
  • 13
  • this is the list of my env: how can i make it to read from anaconda2 instead of anaconda3 ?ana41py27 /home/hoda/anaconda3/envs/ana41py27 my_env3 /home/hoda/anaconda3/envs/my_env3 py27 /home/hoda/anaconda3/envs/py27 py35 /home/hoda/anaconda3/envs/py35 py36 /home/hoda/anaconda3/envs/py36 python2Env /home/hoda/anaconda3/envs/python2Env tensorflow /home/hoda/anaconda3/envs/tensorflow root * /home/hoda/anaconda3 – Hoda Fakharzadeh Mar 09 '17 at 12:44
  • I assume you are referring to the file path that says "/home/hoda/**anaconda3**/... ". This just means the root version your installation of anaconda is in python3. As long as you follow the steps above, the environment you create will be in python2 even if created from a python3 root environment. Anaconda basically creates a python2 environment within the python 3 one. – user2118915 Mar 14 '17 at 08:39
-1

try changing the file directory from the python 3.5 to python 2.7.e.g C:\Users\python36 to C:\Users\python27 in ipython settings or preferences