Skip to main content

A simple command line tool to wrap blender 2.8+ as a jupyter kernel

Project description

Blender Notebook

A simple command line tool to wrap blender 2.8+ as a jupyter kernel.

Blender's python API requires its embedded python interpreter. As of Blender 4.3, python 3.11 is packaged. In order to make ipykernel and other pip packages accessible to Blender, the site-packages directory of the python interpreter executing blender_notebook will be added to Blender's python path. Therefore, it's highly recommended to use exactly the same python version as your blender.

Installation

The easiest way to install blender_notebook is via pip:

$ python -m pip install blender_notebook

It can also be installed from source:

$ python -m pip install -e .

Usage

If blender in installed by a package manager, the easiest way to find the executable path is:

$ which blender
/snap/bin/blender

In my case, blender is installed from snap.

On MacOS, the blender executable path is usually:

/Applications/Blender.app/Contents/MacOS/Blender

On Windows, the blender executable path is usually:

C:\Program Files\Blender Foundation\Blender 4.3\blender.exe

Then, run the blender_notebook CLI (replace "snap/bin/blender" with your blender executable path):

$ blender_notebook install --blender-exec="/snap/bin/blender"
Saving files to ~/.local/share/jupyter/kernels/blender

If you launch jupyter notebook as usual, a new kernel named blender should be available.

$ jupyter kernelspec list
Available kernels:
blender              ~/.local/share/jupyter/kernels/blender

$ jupyter notebook

You can also delete the kernel:

$ blender_notebook remove
Are you sure to delete ~/.local/share/jupyter/kernels/blender ? [y/N]: y
blender jupyter kernel is removed!

Development:

  1. uv sync
  2. uv build
  3. uv publish

Changelog

0.0.4

  • ajust README to Blender 4.3
  • Change build system from setup.py to pyproject.toml

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blender_notebook-0.0.4.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blender_notebook-0.0.4-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file blender_notebook-0.0.4.tar.gz.

File metadata

  • Download URL: blender_notebook-0.0.4.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.8

File hashes

Hashes for blender_notebook-0.0.4.tar.gz
Algorithm Hash digest
SHA256 ab922d5cc7fd5722be9a0bb81a1e286d8ff11987a7e6c6f0afcede00bb9603b0
MD5 26872043e0513ab1941dc547fc2aae49
BLAKE2b-256 a361f8e92020f497a6e2d8a075c7b98ac50e47f77d300ed5737e3f73457a3654

See more details on using hashes here.

File details

Details for the file blender_notebook-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for blender_notebook-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 063f460f6b7f0e06f8b3788fdd64f1ebaf5893926bb4d0f9f350b75c8cd78e6f
MD5 90332050cdbd90de367ee837076a354b
BLAKE2b-256 00c4810c020ad7b0b5e4f8d5ef605724b624cedea179061cbfd353ffaa2b121d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page