### Start boot2docker VM Source: https://docs.jupyter.org/en/latest/contributing/ipython-dev-guide/boot2docker.html Start the boot2docker virtual machine. ```bash $ boot2docker up ``` -------------------------------- ### Initialize and start boot2docker Source: https://docs.jupyter.org/en/latest/_sources/contributing/ipython-dev-guide/boot2docker.rst.txt Commands to initialize the VM and start the boot2docker service. ```bash $ boot2docker init ``` ```bash $ boot2docker up ``` -------------------------------- ### Jupyter Notebook Server Output Example Source: https://docs.jupyter.org/en/latest/_sources/running.rst.txt This is an example of the output you might see in your terminal when starting the Jupyter Notebook server, including the serving directory and URL. ```bash $ jupyter notebook [I 08:58:24.417 NotebookApp] Serving notebooks from local directory: /Users/catherine [I 08:58:24.417 NotebookApp] 0 active kernels [I 08:58:24.417 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/ [I 08:58:24.417 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). ``` -------------------------------- ### Install Documentation Dependencies Source: https://docs.jupyter.org/en/latest/_sources/contributing/docs-contributions/getting-started.rst.txt Install required packages for building and checking documentation. ```bash pip install sphinxcontrib-spelling sphinx_rtd_theme nbsphinx pyenchant recommonmark==0.4.0 jupyter_sphinx_theme ``` -------------------------------- ### Interactive Python Session Example Source: https://docs.jupyter.org/en/latest/_sources/contributing/ipython-dev-guide/documenting_ipython.rst.txt An example of an interactive Python session, showing how to import a utility function and get the IPython directory. ```python >>> from IPython.utils.path import get_ipython_dir >>> get_ipython_dir() '/home/fperez/.config/ipython' ``` -------------------------------- ### Install Sphinx via PyPI Source: https://docs.jupyter.org/en/latest/_sources/contributing/ipython-dev-guide/documenting_ipython.rst.txt Command to install the latest version of Sphinx. ```bash pip install sphinx ``` -------------------------------- ### Install notebook extensions Source: https://docs.jupyter.org/en/latest/_sources/use/advanced/migrating.rst.txt Compare the legacy IPython command with the current Jupyter command for installing extensions. ```bash ipython install-nbextension [--user] EXTENSION ``` ```bash jupyter nbextension install [--user] EXTENSION ``` -------------------------------- ### Install Notebook Alpha Release Source: https://docs.jupyter.org/en/latest/_sources/community/community-call-notes/2025-september.md.txt Use this command to install the alpha version of the Notebook for testing. Ensure you have pip installed. ```bash pip install notebook==7.5.0a1 ``` -------------------------------- ### Run Jupyter Notebook Source: https://docs.jupyter.org/en/latest/_sources/install/notebook-classic.rst.txt Use this command to start the Jupyter Notebook server after installation. Refer to the documentation for more details on running the notebook. ```bash jupyter notebook ``` -------------------------------- ### Compile CSS using setup.py Source: https://docs.jupyter.org/en/latest/_sources/contributing/ipython-dev-guide/less.rst.txt Use the setup script to trigger the CSS compilation process. ```python python setup.py css ``` -------------------------------- ### Install boot2docker and docker on Mac OS X Source: https://docs.jupyter.org/en/latest/_sources/contributing/ipython-dev-guide/boot2docker.rst.txt Use Homebrew to install the necessary tools on a Mac host. ```bash $ brew install boot2docker docker ``` -------------------------------- ### Install kernel specifications Source: https://docs.jupyter.org/en/latest/_sources/use/advanced/migrating.rst.txt Compare the legacy IPython command with the current Jupyter command for installing kernel specs. ```bash ipython kernelspec install [--user] KERNEL ``` ```bash jupyter kernelspec install [--user] KERNEL ``` -------------------------------- ### Run Docker container Source: https://docs.jupyter.org/en/latest/_sources/contributing/ipython-dev-guide/boot2docker.rst.txt Start the container with the source tree mounted for live development. ```bash # change to the root of the git clone $ cd ipython $ docker run -it --rm -p 8888:8888 --workdir /srv/ipython --name ipython-dev -v `pwd`:/srv/ipython ipython /bin/bash ``` -------------------------------- ### Install Sphinx Source: https://docs.jupyter.org/en/latest/_sources/contributing/docs-contributions/getting-started.rst.txt Commands to install the stable development or current released version of Sphinx. ```bash pip install git+https://github.com/sphinx-doc/sphinx@stable ``` ```bash pip install sphinx ``` -------------------------------- ### IPython Session Example Source: https://docs.jupyter.org/en/latest/_sources/contributing/ipython-dev-guide/documenting_ipython.rst.txt An example of an interactive IPython session, demonstrating importing IPython and checking its version, as well as a simple arithmetic operation. ```ipython In [7]: import IPython In [8]: print "This IPython is version:",IPython.__version__ This IPython is version: 0.9.1 In [9]: 2+4 Out[9]: 6 ``` -------------------------------- ### Multi-line Input and Output Example Source: https://docs.jupyter.org/en/latest/_sources/contributing/ipython-dev-guide/sphinx_directive.rst.txt A further example showcasing multi-line input, including a for loop, and its corresponding multi-line output. ```python .. code:: python3 In [106]: print x --------> print(x) jdh In [109]: for i in range(10): .....: print i .....: .....: 0 1 2 3 4 5 6 7 8 9 ``` -------------------------------- ### Install Sphinx Development Version Source: https://docs.jupyter.org/en/latest/contributing/docs-contributions/getting-started.html Install the stable development version of Sphinx for testing documentation changes. ```bash pip install git+https://github.com/sphinx-doc/sphinx@stable ``` -------------------------------- ### Run Notebook server Source: https://docs.jupyter.org/en/latest/_sources/contributing/ipython-dev-guide/boot2docker.rst.txt Start the IPython notebook server inside the container. ```bash container $ ipython notebook --no-browser --ip=* ``` -------------------------------- ### Install IPython Notebook Extension (Legacy) Source: https://docs.jupyter.org/en/latest/use/advanced/migrating.html This command was used in older versions of IPython to install notebook extensions. Use the jupyter nbextension install command for current versions. ```bash ipython install-nbextension [--user] EXTENSION ``` -------------------------------- ### Install and Develop RISE in JupyterLab Source: https://docs.jupyter.org/en/latest/community/community-call-notes/2021-november.html Commands to install dependencies, build the project, and enable the RISE extension for local testing. ```bash yarn yarn build python3 -m pip install -e . jupyter server extension enable --sys-prefix rise jupyter serverextension enable --sys-prefix rise jupyter labextension develop --overwrite . ``` -------------------------------- ### Install Python package from source Source: https://docs.jupyter.org/en/latest/_sources/contributing/dev-contributions/index.rst.txt Use this command within a project's source directory to install the package locally. ```bash pip install . ``` -------------------------------- ### Install JupyterLab 3.1.0a9 Source: https://docs.jupyter.org/en/latest/_sources/community/community-call-notes/2021-may.md.txt Commands to install the alpha release of JupyterLab with Real Time Collaboration support. ```bash pip install -U --pre jupyterlab ``` ```bash conda install -c conda-forge -c conda-forge/label/jupyterlab_alpha jupyterlab=3.1.0a9 ``` -------------------------------- ### Install IPython in editable mode Source: https://docs.jupyter.org/en/latest/_sources/contributing/ipython-dev-guide/boot2docker.rst.txt Uninstall the existing package and install the local source in editable mode within the container. ```bash container $ pip uninstall ipython # pip install ipython in editable mode container $ cd /srv container $ ls ipython container $ pip install -e ipython ``` -------------------------------- ### Install Sphinx Dependencies Source: https://docs.jupyter.org/en/latest/_sources/contributing/ipython-dev-guide/documenting_ipython.rst.txt Required system packages for building documentation on Ubuntu. ```bash texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended ``` -------------------------------- ### kernel_ready.Kernel Event Source: https://docs.jupyter.org/en/latest/_sources/contributing/ipython-dev-guide/js_events.rst.txt Fired after the kernel has fully started up, similar to `kernel_idle.Kernel`. ```APIDOC ## kernel_ready.Kernel ### Description Like `kernel_idle.Kernel`, but triggered after the kernel has fully started up. ### Event `kernel_ready.Kernel` ``` -------------------------------- ### Shell Code Example Source: https://docs.jupyter.org/en/latest/_sources/contributing/ipython-dev-guide/documenting_ipython.rst.txt A sequence of shell commands to change directory, echo the home directory, and list files. This is an example of shell commands within documentation. ```bash cd /tmp echo "My home directory is: $HOME" ls ``` -------------------------------- ### Install and Enable RISE Extension in JupyterLab Source: https://docs.jupyter.org/en/latest/_sources/community/community-call-notes/2021-november.md.txt Commands to locally test the WIP RISE in JupyterLab PR. Ensure you have yarn installed and are in the extension's directory. ```sh yarn yarn build python3 -m pip install -e . jupyter server extension enable --sys-prefix rise jupyter serverextension enable --sys-prefix rise jupyter labextension develop --overwrite . ``` -------------------------------- ### kernel_starting.Kernel Event Source: https://docs.jupyter.org/en/latest/_sources/contributing/ipython-dev-guide/js_events.rst.txt Triggered when the kernel process is starting up. ```APIDOC ## kernel_starting.Kernel ### Description Triggered when the kernel process is starting up. This is triggered once when the kernel process is starting up, and can be sent as a message by the kernel, or may be triggered by the frontend if it knows the kernel is starting (e.g., it created the kernel and is connected to it, but hasn't been able to communicate with it yet). ### Event `kernel_starting.Kernel` ``` -------------------------------- ### Basic IPython Code Block Source: https://docs.jupyter.org/en/latest/_sources/contributing/ipython-dev-guide/sphinx_directive.rst.txt Example of a basic IPython code block within Sphinx. The prompts are renumbered starting from 1, and inputs/outputs are managed by the embedded interpreter. ```python .. code:: python3 In [136]: x = 2 In [137]: x**3 Out[137]: 8 ``` ```python .. code:: python3 In [136]: x = 2 In [137]: x**3 Out[137]: 8 ``` -------------------------------- ### Build Distributions Source: https://docs.jupyter.org/en/latest/_sources/contributing/dev-contributions/releasing.rst.txt Create source and wheel distributions for the project using setup.py. These are the packages that will be uploaded to PyPI. ```shell python setup.py sdist --formats=gztar python setup.py bdist_wheel ``` -------------------------------- ### Upload Documentation Source: https://docs.jupyter.org/en/latest/_sources/contributing/ipython-dev-guide/documenting_ipython.rst.txt Push the built documentation to the repository. ```bash git push ``` -------------------------------- ### Initialize boot2docker VM Source: https://docs.jupyter.org/en/latest/contributing/ipython-dev-guide/boot2docker.html Initialize the boot2docker virtual machine. ```bash $ boot2docker init ``` -------------------------------- ### Install Jupyter Kernelspec Source: https://docs.jupyter.org/en/latest/use/advanced/migrating.html Use this command to install kernel specifications for Jupyter. Kernel specs are installed in system-wide or user-specific locations. ```bash jupyter kernelspec install [--user] KERNEL ``` -------------------------------- ### Install JupyterLab Alpha Release Source: https://docs.jupyter.org/en/latest/_sources/community/community-call-notes/2025-september.md.txt Use this command to install the alpha version of JupyterLab for testing purposes. Ensure you have pip installed. ```bash pip install jupyterlab==4.5.0a3 ``` -------------------------------- ### Build and Test Documentation Source: https://docs.jupyter.org/en/latest/_sources/contributing/docs-contributions/getting-started.rst.txt Commands to build documentation locally and verify external links. ```bash make html ``` ```bash open build/html/index.html ``` ```bash make linkcheck ``` -------------------------------- ### Install Jupyter Notebook Extension Source: https://docs.jupyter.org/en/latest/use/advanced/migrating.html Use this command to install notebook extensions for Jupyter. Extensions are typically installed in a system-wide location or user-specific directory. ```bash jupyter nbextension install [--user] EXTENSION ``` -------------------------------- ### Example test suite output Source: https://docs.jupyter.org/en/latest/_sources/contributing/ipython-dev-guide/testing.rst.txt Sample output showing system information and test results after running the suite. ```text ********************************************************************** Test suite completed for system with the following information: {'commit_hash': '144fdae', 'commit_source': 'repository', 'ipython_path': '/home/fperez/usr/lib/python2.6/site-packages/IPython', 'ipython_version': '0.11.dev', 'os_name': 'posix', 'platform': 'Linux-2.6.35-22-generic-i686-with-Ubuntu-10.10-maverick', 'sys_executable': '/usr/bin/python', 'sys_platform': 'linux2', 'sys_version': '2.6.6 (r266:84292, Sep 15 2010, 15:52:39) \n[GCC 4.4.5]'} Tools and libraries available at test time: curses matplotlib pymongo qt sqlite3 tornado wx wx.aui zmq Ran 9 test groups in 67.213s Status: OK ``` -------------------------------- ### Install IPython Kernelspec (Legacy) Source: https://docs.jupyter.org/en/latest/use/advanced/migrating.html This command was used in older versions of IPython to install kernel specifications. Use the jupyter kernelspec install command for current versions. ```bash ipython kernelspec install [--user] KERNEL ``` -------------------------------- ### Get Help on Notebook Server Options Source: https://docs.jupyter.org/en/latest/_sources/running.rst.txt Displays help messages and lists available command-line arguments for the Jupyter Notebook server. ```bash jupyter notebook --help ``` -------------------------------- ### Compile LESS to CSS using setup.py Source: https://docs.jupyter.org/en/latest/contributing/ipython-dev-guide/less.html Use this command to compile .less files to CSS if you have the setup.py script available. Ensure fabric, node, and lessc are installed. ```python python setup.py css ``` -------------------------------- ### View Local HTML Documentation Source: https://docs.jupyter.org/en/latest/contributing/docs-contributions/getting-started.html Open the locally built HTML documentation in your web browser. Assumes the output path is 'build/html'. ```bash open build/html/index.html ``` -------------------------------- ### Launch JupyterLab Starters on Binder Source: https://docs.jupyter.org/en/latest/_sources/community/community-call-notes/2020-december.md.txt This is a link to launch the jupyter-starters project on Binder. It is used for defining JSON Schema-based workflows in JupyterLab. ```markdown [![Launch Binder]](https://mybinder.org/v2/gh/deathbeds/wxyz/master?urlpath=lab/tree/src/py/wxyz_notebooks/src/wxyz/notebooks/index.ipynb) ``` -------------------------------- ### Clone Tag and Execute Release Script Source: https://docs.jupyter.org/en/latest/contributing/ipython-dev-guide/releasing.html Prepare a clean environment for building release artifacts and execute the release script. ```bash cd /tmp git clone --depth 1 https://github.com/ipython/ipython.git -b "$TAG" ``` ```bash cd tools && ./release ``` -------------------------------- ### Python Code Example Source: https://docs.jupyter.org/en/latest/contributing/ipython-dev-guide/documenting_ipython.html A basic Python loop and calculation example. This code is intended for demonstration purposes. ```python for i in range(10): print i, print "A big number:",2**34 ``` -------------------------------- ### Install Enchant Library on Linux Source: https://docs.jupyter.org/en/latest/_sources/contributing/docs-contributions/getting-started.rst.txt Install the required Enchant C library for spell checking on Linux systems. ```bash sudo apt-get install enchant ``` -------------------------------- ### View Help Options Source: https://docs.jupyter.org/en/latest/_sources/use/config.rst.txt Commands to display available configuration options for a Jupyter application. ```bash jupyter {application} --help # Just the short options jupyter {application} --help-all # Includes options without short names ``` -------------------------------- ### Build Local HTML Documentation Source: https://docs.jupyter.org/en/latest/contributing/docs-contributions/getting-started.html Build a local HTML version of the documentation from the 'docs' directory. The output will indicate success or provide the path to the generated HTML files. ```bash make html ``` -------------------------------- ### IPython Shell Commands and Navigation Source: https://docs.jupyter.org/en/latest/contributing/ipython-dev-guide/sphinx_directive.html Demonstrates directory navigation and shell command execution within IPython. ```python In [9]: cd mpl/examples/ /home/jdhunter/mpl/examples In [10]: pwd Out[10]: '/home/jdhunter/mpl/examples' In [14]: cd mpl/examples/ mpl/examples/animation/ mpl/examples/misc/ mpl/examples/api/ mpl/examples/mplot3d/ mpl/examples/axes_grid/ mpl/examples/pylab_examples/ mpl/examples/event_handling/ mpl/examples/widgets In [14]: cd mpl/examples/widgets/ /home/msierig/mpl/examples/widgets In [15]: !wc * 2 12 77 README.txt 40 97 884 buttons.py 26 90 712 check_buttons.py 19 52 416 cursor.py 180 404 4882 menu.py 16 45 337 multicursor.py 36 106 916 radio_buttons.py 48 226 2082 rectangle_selector.py 43 118 1063 slider_demo.py 40 124 1088 span_selector.py 450 1274 12457 total ``` -------------------------------- ### Python Code Example Source: https://docs.jupyter.org/en/latest/_sources/contributing/ipython-dev-guide/documenting_ipython.rst.txt A basic Python code snippet demonstrating a loop and printing values. This is an example of plain text documentation. ```python for i in range(10): print i, print "A big number:",2**34 ``` -------------------------------- ### Install JupyterLab 3.1.0a9 Source: https://docs.jupyter.org/en/latest/community/community-call-notes/2021-may.html Use pip to install the alpha version of JupyterLab 3.1.0a9. This version includes Real Time Collaboration (RTC) features. ```bash pip install -U --pre jupyterlab ``` -------------------------------- ### Interactive Python Session Example Source: https://docs.jupyter.org/en/latest/contributing/ipython-dev-guide/documenting_ipython.html Demonstrates importing a utility function and calling it within an interactive Python session. Shows the typical output of such a call. ```python >>> from IPython.utils.path import get_ipython_dir >>> get_ipython_dir() '/home/fperez/.config/ipython' ``` -------------------------------- ### Start Jupyter Notebook on a Custom Port Source: https://docs.jupyter.org/en/latest/_sources/running.rst.txt Starts the notebook server on a specified port (e.g., 9999) if the default port 8888 is unavailable or in use. ```bash jupyter notebook --port 9999 ``` -------------------------------- ### NumPy Style Docstring Example (Multiline) Source: https://docs.jupyter.org/en/latest/_sources/contributing/ipython-dev-guide/documenting_ipython.rst.txt Example of a multiline docstring for a function, adhering to NumPy conventions. Includes a summary line and a more detailed section. ```python def add(a, b): """The sum of two numbers. Here is the rest of the docs. """ code ``` -------------------------------- ### Build Documentation Source: https://docs.jupyter.org/en/latest/_sources/contributing/ipython-dev-guide/documenting_ipython.rst.txt Command to build and commit documentation updates. ```bash make gh-pages ```