Skip to main content

Blender as a python module

Project description

blenderpy

Blender as a python module with easy-install

About

Meant for installation into a virtualenv or wherever, for unit testing of Blender extensions being authored, or developement of a Blender 3d-enabled Python application.

Depends upon the bpy-build module to make sure the Blender bpy module environment is correct.

For more information, please see:

bpy-build repository

Getting Started

Prebuilt wheels are provided for popular Platforms (MacOS, Windows, and manylinux). Prebuilds are complete builds with audio, CUDA, and Optix functionality, like you would expect with installing the complete application.

Prerequisites

Both building the Python package from sources and installing the wheel files require the bare minimum dependencies listed on the Blender 3D wiki for building Blender. Get these first before opening a new issue.

Installing

Installing from pypi:

pip install bpy && bpy_post_install

Installing from wheel file (see Releases page):

pip install <PATH_TO_WHEEL_FILE> && bpy_post_install

Uninstalling

A unique uninstallation script is required to ensure that all traces of bpy are removed from the hard drive, because Blender expects .dll and .so libraries to be in places that are not part of the Python packaging system.

bpy_pre_uninstall && pip uninstall bpy

Building

See more about building bpy on the wiki page.

FAQ

Q. I am getting failed to find 'bpy_types' module

A. Please see issue #13

Q. I am getting ImportError: DLL load failed: The specified module could not be found

A. Please see issue #15

Q. How do I import addons?

A. Addons (Blender internal and third party) can be imported using the code referenced here.

Q. How can I use Blender in multiprocessing?

A. Blender runtime usage and compatibility with multiprocessing is limited, see the documentation.

Q. What about my operating system of choice?

A. Please file a new issue if you are having trouble installing on your operating system of choice.

Q. What about my Python version of choice?

A. Some builds you will have to make yourself if you have a specific version of the API you want. Likewise, if you are contrained to a specific Python version (especially those that aren't shipped by python.org) then you may have to try and build yourself.

Q. What about my bitness of choice?

A. 32-bit support officially ended with 2.80. See the announcement

Gotchas

Some unique hardware and software configurations may not work, and there is no extant list of things that don't work in the Python standalone module.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

bpy-2.91a0-cp37-cp37m-manylinux2014_x86_64.whl (192.2 MB view hashes)

Uploaded CPython 3.7m

bpy-2.91a0-cp37-cp37m-macosx_10_13_x86_64.whl (147.3 MB view hashes)

Uploaded CPython 3.7m macOS 10.13+ x86-64

Supported by

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