Skip to content

Building

Tyler Alden Gubala edited this page Oct 20, 2020 · 2 revisions

Building

Building the Blender Python module can sometimes be difficult for first time users. This repository attempts to automate the build for you using several Visual Studio Code tasks.

Prerequisites

Before expecting a complete build from sources you must install the bare minimum dependencies listed on the Blender Wiki pages for building Blender 3D. Follow the links through the web pages to find your system and get all the necessary binaries from the package manager of your choice.

Option1: Build from sdist hosted on pypi

This is the most automated solution, but it also takes the longest and has no guarantees of working:

Windows

py -m pip install bpy --no-binary :all:

Unix like

pip3 install bpy --no-binary :all:

Option2: Clone the Repo and build using VS Code Tasks

Sometimes you are going to want to have a build sitting on your system, especially if you are working on experimental features of Blender or on a weird fork of Blender. In these cases building has been automated using the VS Code Tasks.

You will need Visual Studio Code, as well as the bare minimum dependencies listed on the Blender Wiki pages for building Blender 3D.

View -> Command Palette -> Tasks: Run Task -> First Time - GIT and SVN Checkout

View -> Command Palette -> Tasks: Run Task -> Update Blender Sources [Checks Out Master Branch]

View -> Command Palette -> Tasks: Run Task -> Build

Option3: You already Built Blender 3D as a Python Module somewhere on your system, and just want to install that?

This one I cannot support, You should know what you are doing if you choose this option, but it is pretty easy to follow.

If Blender as a Python module was already built on your system and you just want to install that you can clone this repo and run the following command:

Windows

py -m pip install . --global-option="build_ext" --global-option="--builtbpy=/path/to/built/blender/bin/Release" -v

Unix like

pip3 install . --global-option="build_ext" --global-option="--builtbpy=/path/to/built/blender/bin" -v