Skip to main content

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 Ubuntu). Prebuilds include "normal" installation (bpy), CUDA (bpy-cuda) and Optix (bpy-optix). Choosing the correct version depends on your use-case and hardware but in general bpy should be just fine for non-rendering automation tasks while bpy-optix has the best performance but requires a NVIDIA RTX Card and up to date drivers.

Installing

Installing a prebuilt on these platforms is simple.

pip install bpy && bpy_post_install

Self Building

Building the Blender API for your own platform can be difficult, however this repo should make it easy enough for you to create your own builds by hand.

Build from sdist

You can build from a source distribution using pip.

Prerequisites

Performing a build from sdist requires at least the prerequisites for building Blender. See the wiki for the list of prerequisite applications.

Windows

py -3.7-64 -m pip install --upgrade pip wheel future-fstrings

Other

python3.7 -m pip install --upgrade pip wheel future-fstrings
Build

Windows

py -3.7-64 -m pip install bpy --no-binary

Other

python3.7 -m pip install bpy --no-binary

Build from repo

You can also build after cloning the repository, this is helpful during development.

Prerequisites
python3 -m pip install --upgrade pip wheel future-fstrings
git clone https://github.com/TylerGubala/blenderpy.git
Build

If you have a specific version of bpy you want, you have to change the VERSION string at the beginning of the bpy_<optional extra>_setup.py file.

To build, run the below command.

Windows py bpy_setup.py sdist bdist_wheel Other python3 bpy_setup.py sdist bdist_wheel

The resultant wheel in the dist folder can be installed using pip.

Post any errors you have as an issue.

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. MacOS support is on its way. After that is Ubuntu.

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.

Gotchas

I have not tested this for platforms other than Windows Python 3.6.x at the moment. More to come soon.

Metadata

Release files for bpy-cuda 2.82

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for bpy-cuda 2.82
File Interpreter ABI Platform Actions
bpy_cuda-2.82-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details for bpy_cuda-2.82-cp37-cp37m-win_amd64.whl

Release files / bpy_cuda-2.82-cp37-cp37m-win_amd64.whl

Download URL bpy_cuda-2.82-cp37-cp37m-win_amd64.whl
Size 128.9 MB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
8029a98d79959af6d0881835c0ed542f01c76da4124833ec65077b3d8dc04c0f
BLAKE2b-256 checksum
How to use checksums
ce7808a413323feaa2ca3a4eb71a50ab44b11600bb5f50df544d37aff94ad13f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.0

Security for bpy-cuda 2.82

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page