JupyterLab: Run a fresh instance in 1 minute (= 3 commands)
Oct 4, 2021 14:25 ยท 149 words ยท 1 minute read
JupyterLab is a great way to interactively play around with Python, e.g. when doing data science, i.e. examining a data set. Here is my favorite way to install it. Main advantage in my opinion: This type of installation does not install JupyterLab globally, but scoped to a specific folder.
Prerequisites
- Python 3.x (is installed by default on Ubuntu/Debian and macOS)
- The awesome Poetry Python package manager. See Installation Docs. Installation is a one-line command ๐
Commands
poetry init --no-interaction
: Initialize a new empty Poetry projectpoetry add jupyterlab
: Install JupyterLab in a separate virtual environment (does not clash with your existing installed Python packages)poetry run jupyter-lab
: Run JupyterLab โ you will receive an URL under which you can visit & use the running instance.
Boom, you’re done! ๐
In the future, you can run JupyterLab from this folder by simply running the last command, poetry run jupyter-lab
. ๐
- You are in control
- My Favorite Shortcuts for VS Code
- Customizing my shell: From bash to zsh to fish
- JSON5: JSON with comments (and more!)
- jq: Analyzing JSON data on the command line
- Get Total Directory Size via Command Line
- Changing DNS server for Huawei LTE router
- Notes on Job & Career Development
- Adding full-text search to a static site (= no backend needed)
- Generating a random string on Linux & macOS