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 2.82, python 3.7 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 2.82\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!

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.3.tar.gz (5.4 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: blender_notebook-0.0.3.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for blender_notebook-0.0.3.tar.gz
Algorithm Hash digest
SHA256 a7cc862489a0943f5d4ae441d771293ec1868cddf40936bf81159fd93ba23d84
MD5 a91ec8b331bb764009683279ca1836ed
BLAKE2b-256 69bd549dbfbf410030886094efc976bed1f3d7e78097c72e8e1c6f524e306219

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