jupyter / help

:sparkles: Need some help or have some questions? Please visit our Discourse page.
https://discourse.jupyter.org
291 stars 97 forks source link

Jupyter kernel install issue #83

Open hsafe opened 8 years ago

hsafe commented 8 years ago

Hello, I have encountered an issue which is not really addressed in communities or forums-as far as I've searched. The thing is that am running on archlinux and have got both of the pythons(Python 3.5.2 & 2.7.12). The default python or pip is set to the latest version of python 3.5.2. While installing Jupyter naturally it used the default python and now the available kernel I have is only python 3.5. I need to get another working kernel beside that which is python 2.7 and have issue setting it up. All instructions are really vice versa and can't help..

Can you please help?Thank you

[hsafe@thinkt ~]$ sudo pip install jupyter [hsafe@thinkt ~]$ jupyter notebook [I 09:53:51.715 NotebookApp] Writing notebook server cookie secret to /run/user/1000/jupyter/notebook_cookie_secret [I 09:53:51.752 NotebookApp] Serving notebooks from local directory: /home/hsafe [I 09:53:51.752 NotebookApp] 0 active kernels [I 09:53:51.752 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/

hsafe@thinkt ~]$ pip -V pip 8.1.2 from /usr/lib/python3.5/site-packages (python 3.5)

[hsafe@thinkt ~]$ python Python 3.5.2 (default, Jun 28 2016, 08:46:01) [GCC 6.1.1 20160602] on linux

[hsafe@thinkt ~]$ sudo python2.7 -m pip install ipykernel /usr/bin/python2.7: No module named pip

[hsafe@thinkt ~]$ sudo python -m pip install ipykernel Requirement already satisfied (use --upgrade to upgrade): ipykernel in /usr/lib/python3.5/site-packages Requirement already satisfied (use --upgrade to upgrade): jupyter-client in /usr/lib/python3.5/site-packages (from ipykernel) Requirement already satisfied (use --upgrade to upgrade): tornado>=4.0 in /usr/lib/python3.5/site-packages (from ipykernel) Requirement already satisfied (use --upgrade to upgrade): traitlets>=4.1.0 in /usr/lib/python3.5/site-packages (from ipykernel) Requirement already satisfied (use --upgrade to upgrade): ipython>=4.0.0 in /usr/lib/python3.5/site-packages (from ipykernel) Requirement already satisfied (use --upgrade to upgrade): pyzmq>=13 in /usr/lib/python3.5/site-packages (from jupyter-client->ipykernel) Requirement already satisfied (use --upgrade to upgrade): jupyter-core in /usr/lib/python3.5/site-packages (from jupyter-client->ipykernel)

takluyver commented 8 years ago

Our kernel install instructions are written this way round, with Jupyter running on Python 3: http://ipython.readthedocs.io/en/stable/install/kernel_install.html#kernels-for-python-2-and-3

But if you see instructions assuming Jupyter is on Python 2, it should work if you switch things around and do the python3 commands with python2.

First, you'll need to either install ipykernel for Python 2 using Arch packages, or install pip for Py2 (python2-pip?) and use that to install ipykernel as you already tried (python2.7 -m pip install ipykernel). Then you'll be able to run:

python2 -m ipykernel install --user