{"action":"created","issue":{"url":"https://api.github.com/repos/jupyter/jupyter/issues/52","repository_url":"https://api.github.com/repos/jupyter/jupyter","labels_url":"https://api.github.com/repos/jupyter/jupyter/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/jupyter/jupyter/issues/52/comments","events_url":"https://api.github.com/repos/jupyter/jupyter/issues/52/events","html_url":"https://github.com/jupyter/jupyter/issues/52","id":110120024,"number":52,"title":"Ambiguous instructions for installing python2 and python3 kernels, Big Split path issues?","user":{"login":"michaelpacer","id":2482408,"avatar_url":"https://avatars.githubusercontent.com/u/2482408?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelpacer","html_url":"https://github.com/michaelpacer","followers_url":"https://api.github.com/users/michaelpacer/followers","following_url":"https://api.github.com/users/michaelpacer/following{/other_user}","gists_url":"https://api.github.com/users/michaelpacer/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelpacer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelpacer/subscriptions","organizations_url":"https://api.github.com/users/michaelpacer/orgs","repos_url":"https://api.github.com/users/michaelpacer/repos","events_url":"https://api.github.com/users/michaelpacer/events{/privacy}","received_events_url":"https://api.github.com/users/michaelpacer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":25,"created_at":"2015-10-06T23:05:44Z","updated_at":"2016-02-22T15:35:33Z","closed_at":"2015-12-30T11:09:29Z","body":"In attempting to collaborate with @suchow, we ran into an issue with his jupyter notebook having been installed through python2 and my having written the notebook with a python3 kernel in mind.\r\n\r\nHe had an ipython3 version of the notebook with `python3` as its kernel, but that would not run `Python 3.5`. \r\n\r\nIn trying to figure out how to fix the original problem (i.e., a jupyter notebook installed through `python2` not having access to a `python3` kernel) I began a long trek through a lot of conflicting documentation, this issue is the trail as I tried to recreate it (I am guessing I left out some parts). \r\n\r\nI ended up at this documentation which only says that a Python kernel is installed when you installed the notebook https://github.com/jupyter/jupyter/blob/master/docs/source/install.rst. \r\n\r\nLook at http://jupyter.cs.brynmawr.edu/hub/dblank/public/Jupyter%20Help.ipynb#1.4.2-Enable-Python-3-kernel but that seems to use the `~/.ipython/kernels/` path rather than the post Big Split path which seems to be `~/Library/Jupyter` or `/usr/local/share/jupyter` (since `~/.jupyter` is for config files, not data files and kernels are data files). \r\n\r\nEventually I found http://jupyter.readthedocs.org/en/latest/migrating.html#kernels, which says\r\n\r\n> You can see where the file is with `jupyter kernelspec list`, and then modify `kernels/python3/kernel.json` by hand. [a2km](https://github.com/minrk/a2km) is an experimental project that tries to make these things easier.\r\n\r\nBut the file path is not returned when I run `jupyter kernelspec list`, all it does is return\r\n```\r\nAvailable kernels:\r\n  python3\r\n```\r\n\r\nAnd going from to https://github.com/ipython/ipython/wiki/IPython-kernels-for-other-languages includes no instructions for how to install a `Python 2` kernel if you began with a `Python 3` kernel (or vice-versa). \r\n\r\nI only noticed now that \r\n\r\n> `IPython.kernel` → `jupyter_client`, `ipykernel` (`IPython.kernel` became two packages - one for the client-side APIs, one for the IPython kernel for Jupyter)\r\n\r\nwhich leads me to look at http://ipython.org/ipython-doc/dev/development/kernels.html\r\n\r\nWhich suggests (contrary to the above jupyter migration documentation)\r\n\r\n> To see the available kernel specs, run:\r\n>\r\n>        ipython kernelspec list\r\n\r\n(which also only returns a list of the kernels with no path)\r\n\r\nAnd also says: \r\n<table border=\"1\" class=\"docutils\">\r\n<colgroup>\r\n<col width=\"10%\"/>\r\n<col width=\"47%\"/>\r\n<col width=\"43%\"/>\r\n</colgroup>\r\n<thead valign=\"bottom\">\r\n<tr class=\"row-odd\"><th class=\"head\">&nbsp;</th>\r\n<th class=\"head\">Unix</th>\r\n<th class=\"head\">Windows</th>\r\n</tr>\r\n</thead>\r\n<tbody valign=\"top\">\r\n<tr class=\"row-even\"><td>System</td>\r\n<td><p class=\"first\"><tt class=\"docutils literal\"><span class=\"pre\">/usr/share/jupyter/kernels</span></tt></p>\r\n<p class=\"last\"><tt class=\"docutils literal\"><span class=\"pre\">/usr/local/share/jupyter/kernels</span></tt></p>\r\n</td>\r\n<td><tt class=\"docutils literal\"><span class=\"pre\">%PROGRAMDATA%\\jupyter\\kernels</span></tt></td>\r\n</tr>\r\n<tr class=\"row-odd\"><td>User</td>\r\n<td colspan=\"2\"><tt class=\"docutils literal\"><span class=\"pre\">~/.ipython/kernels</span></tt></td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n\r\n\r\nwhich conflicts with the above claim that it should be in either `/usr/local/share/jupyter/kernels` or  `~/Library/Jupyter` (if local) on OSX Unix systems, and suggests continued use of the `~/.ipython/kernels` path (which I should mention, does not exist on my machine). \r\n\r\nI'm genuinely baffled as to how to either instruct someone else to install a `python3` kernel on their machine or to install a `python2` kernel on mine…\r\n\r\nJust to check these are the errors I got when I tried to run \r\n```\r\njupyter kernelspec install python2\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/jupyter-kernelspec\", line 8, in <module>\r\n    main()\r\n  File \"/usr/local/bin/jupyter-kernelspec\", line 5, in main\r\n    KernelSpecApp.launch_instance()\r\n  File \"/usr/local/lib/python3.4/site-packages/traitlets/config/application.py\", line 592, in launch_instance\r\n    app.start()\r\n  File \"/usr/local/lib/python3.4/site-packages/jupyter_client/kernelspecapp.py\", line 177, in start\r\n    return self.subapp.start()\r\n  File \"/usr/local/lib/python3.4/site-packages/jupyter_client/kernelspecapp.py\", line 113, in start\r\n    replace=self.replace,\r\n  File \"/usr/local/lib/python3.4/site-packages/jupyter_client/kernelspec.py\", line 208, in install_kernel_spec\r\n    shutil.copytree(source_dir, destination)\r\n  File \"/usr/local/Cellar/python3/3.4.1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/shutil.py\", line 296, in copytree\r\n    names = os.listdir(src)\r\nFileNotFoundError: [Errno 2] No such file or directory: 'python2'\r\n```\r\nWhich returned similar errors when run with `python2.7`,`python27`,`PYTHON2`,`PYTHON2.7`,`PYTHON27` and even `python`. \r\n\r\nRegardless, the amount of hoops I had to go through and the number of conflicts I ran into suggested to me that this needs more documentation on how to do. \r\n\r\nI'm happy to help write the necessary changes in all the places I found (plus a number of stackexchange answers that I think may be inconsistent with the Big Split… I've posted links to at the bottom of this Issue), I just need to know how to solve the problem at least on my system before I can help with fixing the inconsistent documentation. \r\n\r\nNo matter what, it would seem to make sense to point out that there are two potential python kernels that the jupyter notebook can use, and I would argue that installation instructions for running both side-by-side should be included in the core documentation (or at least in the [list of available kernels page] (https://github.com/ipython/ipython/wiki/IPython-kernels-for-other-languages)). \r\n\r\nrelevant Stack-overflow answers with ambiguous relevance due to big split:\r\n\r\nhttp://stackoverflow.com/questions/30492623/using-both-python-2-x-and-python-3-x-in-ipython-notebook\r\nespecially the answer: http://stackoverflow.com/a/30493155/1816995\r\nhttp://stackoverflow.com/questions/32258277/how-can-i-run-python-2-7-3-4-notebooks-side-by-side-in-jupyter-ipython\r\nhttp://stackoverflow.com/questions/29773954/change-ipython-3-for-python-3-kernel-to-python2-for-the-cluster-too\r\nhttp://stackoverflow.com/questions/28831854/how-do-i-add-python3-kernel-to-jupyter-ipython"},"comment":{"url":"https://api.github.com/repos/jupyter/jupyter/issues/comments/187232942","html_url":"https://github.com/jupyter/jupyter/issues/52#issuecomment-187232942","issue_url":"https://api.github.com/repos/jupyter/jupyter/issues/52","id":187232942,"user":{"login":"kirk86","id":2902390,"avatar_url":"https://avatars.githubusercontent.com/u/2902390?v=3","gravatar_id":"","url":"https://api.github.com/users/kirk86","html_url":"https://github.com/kirk86","followers_url":"https://api.github.com/users/kirk86/followers","following_url":"https://api.github.com/users/kirk86/following{/other_user}","gists_url":"https://api.github.com/users/kirk86/gists{/gist_id}","starred_url":"https://api.github.com/users/kirk86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirk86/subscriptions","organizations_url":"https://api.github.com/users/kirk86/orgs","repos_url":"https://api.github.com/users/kirk86/repos","events_url":"https://api.github.com/users/kirk86/events{/privacy}","received_events_url":"https://api.github.com/users/kirk86/received_events","type":"User","site_admin":false},"created_at":"2016-02-22T15:35:33Z","updated_at":"2016-02-22T15:35:33Z","body":"@takluyver Thank you Thomas. Would you say that is better to leave the kernels at\r\n`~/.local/share/jupyter/kernels/python2`\r\n`~/.local/share/jupyter/kernels/python3`\r\nor it would be better to move them to the default indicated folder for kernels as described in the jupyter documentation, which is:\r\n\r\n`/usr/local/share/jupyter/kernels/python2`\r\n`/usr/local/share/jupyter/kernels/python3`"}}