# Python Local `.venv` Kernel
[![Github](https://img.shields.io/badge/goerz-python--localvenv--kernel-blue.svg?logo=github)](https://github.com/goerz/python-localvenv-kernel)
[![Build Status](https://github.com/goerz/python-localvenv-kernel/workflows/CI/badge.svg)](https://github.com/goerz/python-localvenv-kernel/actions)
[![PyPI](https://img.shields.io/pypi/v/python-localvenv-kernel.svg)](https://pypi.org/project/python-localvenv-kernel/)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/python-localvenv-kernel.svg)](https://anaconda.org/conda-forge/python-localvenv-kernel)
[![Conda Recipe](https://img.shields.io/badge/recipe-conda--forge-green.svg)](https://github.com/conda-forge/python-localvenv-kernel-feedstock)
[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](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:
[![Jupyter Community Call](https://img.youtube.com/vi/hUU77BfU-Kk/0.jpg)](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
![Jupyter launcher screenshot (kernel selector)](https://github.com/goerz/python-localvenv-kernel/blob/master/.static/jupyter-screenshot.png?raw=true)
![Jupyter launcher screenshot (notebook)](https://github.com/goerz/python-localvenv-kernel/blob/master/.static/jupyter-screenshot-2.png?raw=true)
## FAQ
[See `FAQ.md`.][FAQ]
[FAQ]: https://github.com/goerz/python-localvenv-kernel/blob/master/FAQ.md
Raw data
{
"_id": null,
"home_page": "https://github.com/goerz/python-localvenv-kernel",
"name": "python-localvenv-kernel",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "Interactive, Interpreter, Shell, Web",
"author": "Michael H. Goerz",
"author_email": "mail@michaelgoerz.net",
"download_url": "https://files.pythonhosted.org/packages/0c/b7/b293207a943f6341b5703d1526dd336eaf8cf6d3c6d8ae141db89c919618/python-localvenv-kernel-0.1.7.tar.gz",
"platform": null,
"description": "# Python Local `.venv` Kernel\n\n[![Github](https://img.shields.io/badge/goerz-python--localvenv--kernel-blue.svg?logo=github)](https://github.com/goerz/python-localvenv-kernel)\n[![Build Status](https://github.com/goerz/python-localvenv-kernel/workflows/CI/badge.svg)](https://github.com/goerz/python-localvenv-kernel/actions)\n[![PyPI](https://img.shields.io/pypi/v/python-localvenv-kernel.svg)](https://pypi.org/project/python-localvenv-kernel/)\n[![Conda Version](https://img.shields.io/conda/vn/conda-forge/python-localvenv-kernel.svg)](https://anaconda.org/conda-forge/python-localvenv-kernel)\n[![Conda Recipe](https://img.shields.io/badge/recipe-conda--forge-green.svg)](https://github.com/conda-forge/python-localvenv-kernel-feedstock)\n[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n\nA Jupyter kernel that delegates to `ipykernel` in the `.venv` environment of a project folder.\n\nDerived 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).\n\nSee the demo at the December 2023 Jupyter Community Call:\n\n[![Jupyter Community Call](https://img.youtube.com/vi/hUU77BfU-Kk/0.jpg)](https://www.youtube.com/watch?v=hUU77BfU-Kk&t=360)\n\n\n## Installation\n\nThe `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`).\n\nIt must be installed into the same environment as the Jupyter server, see [Usage](#usage) below.\n\n\n## Usage\n\n* Jupyter and the `python-localvenv-kernel` package should be installed in the same environment\n* 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))\n* The project environment must include the `ipykernel` package (but not `jupyter`)\n* Start Jupyter from the project folder\n* Select the \"Python (local .venv)\" kernel\n\n![Jupyter launcher screenshot (kernel selector)](https://github.com/goerz/python-localvenv-kernel/blob/master/.static/jupyter-screenshot.png?raw=true)\n\n![Jupyter launcher screenshot (notebook)](https://github.com/goerz/python-localvenv-kernel/blob/master/.static/jupyter-screenshot-2.png?raw=true)\n\n\n## FAQ\n\n[See `FAQ.md`.][FAQ]\n\n[FAQ]: https://github.com/goerz/python-localvenv-kernel/blob/master/FAQ.md\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python Jupyter kernel delegating to a local virtual environment",
"version": "0.1.7",
"project_urls": {
"Homepage": "https://github.com/goerz/python-localvenv-kernel"
},
"split_keywords": [
"interactive",
" interpreter",
" shell",
" web"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ba10c48efed10096b396c8bc257ac1b3118690d988aa96910af0ce118ff982ce",
"md5": "f34f0a236f1e916a7fbaa964406e906b",
"sha256": "61b5f556a9c5abe5a4160888de4ecd9c11e63aaf3623558fafdd796cc101a614"
},
"downloads": -1,
"filename": "python_localvenv_kernel-0.1.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f34f0a236f1e916a7fbaa964406e906b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 5981,
"upload_time": "2024-05-12T19:43:12",
"upload_time_iso_8601": "2024-05-12T19:43:12.811580Z",
"url": "https://files.pythonhosted.org/packages/ba/10/c48efed10096b396c8bc257ac1b3118690d988aa96910af0ce118ff982ce/python_localvenv_kernel-0.1.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0cb7b293207a943f6341b5703d1526dd336eaf8cf6d3c6d8ae141db89c919618",
"md5": "a8959fbd3426d6c6c92a87dccbf1ee16",
"sha256": "f890d16710ddfc3d935c288d42cc6f26ac2e2a318887c2dd20f2c5c41b0b247e"
},
"downloads": -1,
"filename": "python-localvenv-kernel-0.1.7.tar.gz",
"has_sig": false,
"md5_digest": "a8959fbd3426d6c6c92a87dccbf1ee16",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 6096,
"upload_time": "2024-05-12T19:43:14",
"upload_time_iso_8601": "2024-05-12T19:43:14.298831Z",
"url": "https://files.pythonhosted.org/packages/0c/b7/b293207a943f6341b5703d1526dd336eaf8cf6d3c6d8ae141db89c919618/python-localvenv-kernel-0.1.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-12 19:43:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "goerz",
"github_project": "python-localvenv-kernel",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "python-localvenv-kernel"
}