Add entries to start Jupyter from context menu.
Project description
Description
Add entries to start the Jupyter Notebook and QtConsole from the file manager context menu. This offers a convenient way of starting Jupyter in a folder. Currently it only supports Microsoft Windows, GNOME (and its many derivatives), and macOS. Contributions to support other OSs/desktop environments are highly welcome.
WinPython and Anaconda/Miniconda distributions are supported. If run from a conda environment other than root, the name of the environment will be specified in brackets in the context menu name.
Microsoft Windows
In addition to starting the QtConsole, the Jupyter Notebook or the Jupyter Lab, and launching the default browser, in Microsoft Windows the process runs from a terminal. Closing the terminal closes the QtConsole or the Jupyter server. Single and all users installations are supported, see installation instructions below.
GNOME
When selecting multiple folders, one instance of Jupyter QtConsole/notebook/lab opens in each of the selected folders. Selecting a file starts Jupyter in the file directory.
Note that in GNOME the processes run in the background. As of Jupyter Notebook 4.1 there is no way to shutdown the server from the notebook UI. To stop the server one has to manually kill the process. Alternatively, nbmanager can discover all running servers and shut them down using via an UI.
GNOME >= 2.22 is required.
macOS
The context menu is only available when an object (folder or file) is selected in Finder. The Jupyter options will be available from the “Services” section of the menu. If a folder is selected then an instance of Jupyter QTConsole/notebook/lab opens in the selected folder. If a file is selected then Jupyter is started in the file directory. If the file is a jupyter notebook (*.ipynb), then selecting Jupyter notebook/lab will open the file in that program; Jupyter QtConsole will still only open in the file directory.
As the processes are opened through a shell script in Automator, a spinning cog will be visible in the menu bar when the processes are running. Once you have finished with the server then manually kill the process via the drop-down menu from this spinning cog.
The launchers have been tested on macOS Mojave (10.14.6).
Installation instructions
Any platform
Install from pypi using pip:
$ pip install start_jupyter_cm
Or install from conda-forge channel using conda (in a Anaconda/Miniconda distribution):
$ conda install -c conda-forge start_jupyter_cm
After installation, enable the context menu entries from a terminal as follows:
$ start_jupyter_cm
To remove the context menu entries execute the following in a terminal:
$ start_jupyter_cm --remove
To uninstall the package:
$ pip uninstall start_jupyter_cm
On Microscoft Windows, the administrator rights are required to add the entry for all users, otherwise the entries will be added only for the current user. In GNOME and OSX only for the current user.
Also, be aware that, uninstalling the package does not remove the context menu entries. If you are left with the context menu entries after uninstalling start_jupyter_cm, reinstall it, remove the entries as above and uninstall it again.
Microsoft Windows
In Microsoft Windows the preferred way to install this package would be using the Windows MSI installers if it wasn’t for this Python bug. Until this issue is fixed, we will not distribute MSI installers.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for start_jupyter_cm-2.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6d6aacbd20c253b457c719680221b0d868f22900dc12137ec79cbc6bd3e7c32 |
|
MD5 | 01f69dcae0d6302b705a71b3d8b9bd8a |
|
BLAKE2b-256 | 6fafef089ca66d52992258c3b8fd21877d243de795780462fb4303df408ca023 |