mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 15:03:02 +00:00
Merge pull request #372 from minrk/require-notebook-4
drop support for single-user server from IPython 3.x
This commit is contained in:
@@ -25,7 +25,7 @@ Basic principles:
|
||||
|
||||
## Dependencies
|
||||
|
||||
JupyterHub requires [IPython](https://ipython.org/install.html) >= 3.0 (current master) and [Python](https://www.python.org/downloads/) >= 3.3.
|
||||
JupyterHub itself requires [Python](https://www.python.org/downloads/) ≥ 3.3. To run the single-user servers (which may be on the same system as the Hub or not), [Jupyter Notebook](https://jupyter.readthedocs.org/en/latest/install.html) ≥ 4 is required.
|
||||
|
||||
Install [nodejs/npm](https://www.npmjs.com/), which is available from your
|
||||
package manager. For example, install on Linux (Debian/Ubuntu) using:
|
||||
@@ -50,14 +50,15 @@ Notes on the `pip` command used in the installation directions below:
|
||||
|
||||
## Installation
|
||||
|
||||
JupyterHub can be installed with pip:
|
||||
JupyterHub can be installed with pip, and the proxy with npm:
|
||||
|
||||
npm install -g configurable-http-proxy
|
||||
pip3 install jupyterhub
|
||||
|
||||
If you plan to run notebook servers locally, you may also need to install the
|
||||
Jupyter ~~IPython~~ notebook:
|
||||
|
||||
pip3 install notebook
|
||||
pip3 install --upgrade notebook
|
||||
|
||||
|
||||
### Development install
|
||||
|
30
scripts/jupyterhub-singleuser
Executable file → Normal file
30
scripts/jupyterhub-singleuser
Executable file → Normal file
@@ -17,34 +17,22 @@ from jinja2 import ChoiceLoader, FunctionLoader
|
||||
from tornado import ioloop
|
||||
from tornado.web import HTTPError
|
||||
|
||||
try:
|
||||
import notebook
|
||||
except ImportError:
|
||||
raise ImportError("JupyterHub single-user server requires notebook >= 4.0")
|
||||
|
||||
from IPython.utils.traitlets import (
|
||||
from traitlets import (
|
||||
Integer,
|
||||
Unicode,
|
||||
CUnicode,
|
||||
)
|
||||
|
||||
try:
|
||||
import notebook
|
||||
# 4.x
|
||||
except ImportError:
|
||||
from IPython.html.notebookapp import NotebookApp, aliases as notebook_aliases
|
||||
from IPython.html.auth.login import LoginHandler
|
||||
from IPython.html.auth.logout import LogoutHandler
|
||||
from notebook.notebookapp import NotebookApp, aliases as notebook_aliases
|
||||
from notebook.auth.login import LoginHandler
|
||||
from notebook.auth.logout import LogoutHandler
|
||||
|
||||
from IPython.html.utils import url_path_join
|
||||
|
||||
from distutils.version import LooseVersion as V
|
||||
|
||||
import IPython
|
||||
if V(IPython.__version__) < V('3.0'):
|
||||
raise ImportError("JupyterHub Requires IPython >= 3.0, found %s" % IPython.__version__)
|
||||
else:
|
||||
from notebook.notebookapp import NotebookApp, aliases as notebook_aliases
|
||||
from notebook.auth.login import LoginHandler
|
||||
from notebook.auth.logout import LogoutHandler
|
||||
|
||||
from notebook.utils import url_path_join
|
||||
from notebook.utils import url_path_join
|
||||
|
||||
|
||||
# Define two methods to attach to AuthenticatedHandler,
|
||||
|
Reference in New Issue
Block a user