Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goerz/python-localvenv-kernel
A Jupyter kernel that delegates to ipykernel in the .venv environment of a project folder
https://github.com/goerz/python-localvenv-kernel
ipython-kernel jupyter jupyter-notebook kernel python
Last synced: 3 months ago
JSON representation
A Jupyter kernel that delegates to ipykernel in the .venv environment of a project folder
- Host: GitHub
- URL: https://github.com/goerz/python-localvenv-kernel
- Owner: goerz
- License: mit
- Created: 2023-11-14T13:14:39.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-05-12T19:42:42.000Z (9 months ago)
- Last Synced: 2024-11-01T06:42:33.051Z (4 months ago)
- Topics: ipython-kernel, jupyter, jupyter-notebook, kernel, python
- Language: Python
- Homepage:
- Size: 1.4 MB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Python Local `.venv` Kernel
[](https://github.com/goerz/python-localvenv-kernel)
[](https://github.com/goerz/python-localvenv-kernel/actions)
[](https://pypi.org/project/python-localvenv-kernel/)
[](https://anaconda.org/conda-forge/python-localvenv-kernel)
[](https://github.com/conda-forge/python-localvenv-kernel-feedstock)
[](https://opensource.org/licenses/MIT)A Jupyter kernel that delegates to `ipykernel` in the `.venv` environment of a project folder.
Derived from [`poetry-kernel`](https://github.com/pathbird/poetry-kernel), see the [FAQ](https://github.com/goerz/python-localvenv-kernel/blob/master/FAQ.md#how-does-this-kernel-differ-from-poetry-kernel).
See the demo at the December 2023 Jupyter Community Call:
[](https://www.youtube.com/watch?v=hUU77BfU-Kk&t=360)
## Installation
The `python-localvenv-kernel` package can be installed via `pip` (`pip install python-localvenv-kernel`) or as a [Conda package](https://github.com/conda-forge/python-localvenv-kernel-feedstock#about-python-localvenv-kernel-feedstock) (`conda install python-localvenv-kernel`).
It must be installed into the same environment as the Jupyter server, see [Usage](#usage) below.
## Usage
* Jupyter and the `python-localvenv-kernel` package should be installed in the same environment
* The project folder must have a virtual (project) environment instantiated in a subfolder `.venv`. The name of folder can be overridden by setting the environment variable `KERNEL_VENV` (see [FAQ](https://github.com/goerz/python-localvenv-kernel/blob/master/FAQ.md#how-can-i-change-the-directory-for-the-virtual-environment))
* The project environment must include the `ipykernel` package (but not `jupyter`)
* Start Jupyter from the project folder
* Select the "Python (local .venv)" kernel

## FAQ
[See `FAQ.md`.][FAQ]
[FAQ]: https://github.com/goerz/python-localvenv-kernel/blob/master/FAQ.md