All Projects → bhrutledge → jupyter-venv

bhrutledge / jupyter-venv

Licence: other
Jupyter Notebooks and Virtual Environments

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to jupyter-venv

callisto
A command line utility to create kernels in Jupyter from virtual environments.
Stars: ✭ 15 (-25%)
Mutual labels:  jupyter, virtualenv
Tox
Command line driven CI frontend and development task automation tool.
Stars: ✭ 2,523 (+12515%)
Mutual labels:  virtualenv, venv
mpl-interactions
Sliders to control matplotlib and other interactive goodies. Works in any interactive backend and even uses ipywidgets when in a Jupyter notebook
Stars: ✭ 62 (+210%)
Mutual labels:  jupyter
jupyter rfb
Remote Frame Buffer for Jupyter
Stars: ✭ 21 (+5%)
Mutual labels:  jupyter
dmind
jupyter notebook 的思维导图插件
Stars: ✭ 21 (+5%)
Mutual labels:  jupyter
kuwala
Kuwala is the no-code data platform for BI analysts and engineers enabling you to build powerful analytics workflows. We are set out to bring state-of-the-art data engineering tools you love, such as Airbyte, dbt, or Great Expectations together in one intuitive interface built with React Flow. In addition we provide third-party data into data sc…
Stars: ✭ 474 (+2270%)
Mutual labels:  jupyter
data-lineage
Generate and Visualize Data Lineage from query history
Stars: ✭ 166 (+730%)
Mutual labels:  jupyter
astetik
Astetik takes away the pain from telling visual stories with data on Python
Stars: ✭ 15 (-25%)
Mutual labels:  jupyter
ko data science docker
데이터 분석 모델링용 도커 이미지
Stars: ✭ 14 (-30%)
Mutual labels:  jupyter
ipymarkup
NER, syntax markup visualizations
Stars: ✭ 108 (+440%)
Mutual labels:  jupyter
EngComp4 landlinear
Using computational thinking to get deep insights on the foundations of linear algebra
Stars: ✭ 102 (+410%)
Mutual labels:  jupyter
deep-learning-nd
Udacity Deep learning nanodegree projects
Stars: ✭ 52 (+160%)
Mutual labels:  jupyter
jupyterlab-theme-solarized-dark
JupyterLab 2/3 Solarized Dark extension
Stars: ✭ 61 (+205%)
Mutual labels:  jupyter
jupyterhub-deploy-hpc
Documented examples of Jupyterhub deployment in HPC settings
Stars: ✭ 30 (+50%)
Mutual labels:  jupyter
pyenvdiff-lib
Python environment comparison tool
Stars: ✭ 23 (+15%)
Mutual labels:  virtualenv
keras-adversarial-autoencoders
Experiments with Adversarial Autoencoders using Keras
Stars: ✭ 20 (+0%)
Mutual labels:  jupyter
pytest-notebook
A pytest plugin for regression testing and regenerating Jupyter Notebooks
Stars: ✭ 35 (+75%)
Mutual labels:  jupyter
zoe
Zoe: Container Analytics as a Service -- mirror of https://gitlab.eurecom.fr/zoe/main/
Stars: ✭ 51 (+155%)
Mutual labels:  jupyter
gaia
Gaia is a geospatial analysis library jointly developed by Kitware and Epidemico.
Stars: ✭ 29 (+45%)
Mutual labels:  jupyter
MGT-python
Musical Gestures Toolbox for Python
Stars: ✭ 25 (+25%)
Mutual labels:  jupyter

Jupyter Notebooks and Virtual Environments

Run one notebook server per user, but allow notebooks to be created in multiple Python virtual environments.

Install Jupyter

Note: If you're using the Anaconda distribution of Python, you can probably skip this step, and just run jupyter notebook in the default environment.

Clone this repo, then install Jupyter and useful tools like Pandas into a virtual environment:

python3 -m venv venv

source venv/bin/activate

pip install -U setuptools wheel pip pip-tools

pip-sync

jupyter nbextension enable --py --sys-prefix widgetsnbextension

jupyter labextension install @jupyter-widgets/jupyterlab-manager

Run the notebook server in your home directory:

jupyter notebook --notebook-dir $HOME

You should now see the Jupyter Notebook application in your web browser, showing the contents of your home directory. To create a notebook, navigate to the directory where you'd like to save it, then click New.

You can also run JupyterLab:

jupyter lab --notebook-dir $HOME

Run as a service on macOS

./load_launch_agent.sh

This will write a .plist file to run the notebook server at http://localhost:8888, then show the contents of the log file. Typing Ctrl-C will return to the prompt, but leave the server running. When you reboot, the server will start automatically.

For JupyterLab, running at http://localhost:8889:

./load_launch_agent.sh lab 8889

Creating notebooks for a virtual environment

In a new shell session, activate the virtual environment for one of your projects, and install an IPython kernel:

cd ~/path/to/my-project

source venv/bin/activate

pip install ipykernel

python -m ipykernel install --user --name=${PWD##*/}

deactivate
  • NOTE: The ipykernel package should be added to the project's requirements.txt

On macOS, this will create a Jupyter kernel spec in $HOME/Library/Jupyter/kernels/my-project. You can edit kernel.json in that directory to set environment variables or pass additional arguments to python.

Reload your Jupyter Notebook browser tab, then use New > my-project to create a notebook. You can now use all of the packages that are installed in the my-project environment. However, this means you can't use the packages in the jupyter-venv environment, used by the default Python 3 kernel. If you want to use packages like Pandas or matplotlib, you'll need to pip install them in the my-project environment (ideally by adding them to its requirements.txt).

Reference

TODO

  • Document rationale for one notebook server per user vs. running jupyter notebook in project's virtual environment (see related issue)
  • Makefile or shell script for creating virtual environment, adding kernel, updating requirements, installing service
  • Use configuration file to set root notebook directory
  • Add a supervisord configuration?
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].