Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to activate Ipython Notebook and QT Console with Python 3.4 in Anaconda 2.0

I have installed in Window 7 environment Anaconda 2.0. The default Python is 2.7 but also Python 3.4 is installed. I am able to activate Python 3.4 with the command "activate py3k". After this Spyder IDE does work right with Python 3.4 But 1) I'm not able to start Ipython Notebook and QT Console with Python 3.4 2) I'm not able to start Anaconda with Python 3.4 as default (so that also launcher starts the three apps -Spyder, Ipython Notebook and Ipython QT Console with python 3.4)

like image 323
Stefano Gatti Avatar asked Jan 10 '23 12:01

Stefano Gatti


2 Answers

As asmeurer said, when in your py3k environment in the command prompt, you can launch a 3.4 kernel with the ipython notebook command. You can run both a 2.7 and a 3.4 at the same time if you specify a different port, for instance, ipython notebook --port 8080 The 2.7 will default to 8888.

Note that, by default, IPython will look in your current directory for notebooks and store them there if you create them, so it can be helpful to create a directory just for Python 3 notebooks and either cd to it before launching or specify a directory with ipython notebook --port 8080 --notebook-dir C:\\Users\\[User name]\\Documents\\ipython3notebooks

like image 58
Jonas Buckner Avatar answered Jan 13 '23 01:01

Jonas Buckner


The launcher always points to the root environment (Python 2). If you have activated the Python 3 environment, you can launch the notebook by just typing ipython notebook (and the same with the qtconsole with ipython qtconsole).

like image 28
asmeurer Avatar answered Jan 13 '23 00:01

asmeurer