Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Question: how to install Python 2.7 as an additional kernel next to the default Python 3.X one? #71
I am using Jupyterhub, but the amount of inconsistent documentation is not helping. All I want is a fully featured (numpy, scikit*, etc.) Jupyter server up and running, which I expect it what most people want.
The fact that there are three different projects: jupyterhub, jupyter, and ipython doesn't really help when every project sometimes refers to the documentation of the project they depend on.
Yup, the docs fragmentation is a serious problem. Since there are so many entrypoints, I think we are going to have to be okay with some amount of information duplication, since people are going to arrive from so many different directions.
Assuming you are using pip, you can install the
python2 -m pip install --upgrade ipykernel # install the kernel package for Python 2 python2 -m ipykernel install # register the Python 2 kernelspec
Installation of packages such as numpy, etc. is unaffected by Jupyter. The only additional step is installing the kernelspec after installing the kernel package itself, so that Jupyter can find the kernel. JupyterHub itself also has no effect on installation, other than the fact that you presumably want to do system-wide installs of packages and kernelspecs (generally the default already) so that all Hub users have access to what you install.
A totally complete installation of JupyterHub, notebook servers, and kernels for both Python 2 and 3 (sudo may be required, depending on the system):
python3 -m pip install jupyterhub notebook ipykernel python3 -m ipykernel install # register Python 3 kernel (not technically necessary at this point, but a good idea) python2 -m pip install ipykernel python2 -m ipykernel install # register Python 2 kernel
And you can install whatever packages you want for Python 3 and/or Python 2 in the usual ways.
If you do the same with Anaconda, it's a bit easier to get all the way to a full scientific Python stack with multiple versions of Python:
# install everything (except JupyterHub itself) with Python 2 and 3. Jupyter is included in Anaconda. conda create -n py3 python=3 anaconda conda create -n py2 python=2 anaconda # register py2 kernel source activate py2 ipython kernel install # same for py3, and install juptyerhub in the py3 env source activate py3 ipython kernel install pip install jupyterhub
I'll add something like this to the JuptyerHub docs.
the same question, but I use pip3 install jupyter, so the following help me
if using pip2, may be this will work for you, referrence
I'm trying to install on linux and after running:
am getting the following error:
Can you please advise? Thanks!
Maybe you need Anaconda to manage different version of Python? Try this： https://www.anaconda.com/ Hope this could help you. Jake Roth <email@example.com> 于2018年9月11日周二 下午7:35写道：…
I'm trying to install on linux and after running: pip install --upgrade setuptools --user python2 python2 -m pip install --upgrade ipykernel --user python2 -m ipykernel install --user am getting the following error: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-0la809/tornado/ Can you please advise? Thanks! — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#71 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/Ac-gIKoa6_CfxgqxDclaabcqfHc-C_lQks5uZ_RTgaJpZM4Gp4a6> .