Page MenuHome

Blender as Python Module - OSX scripts/modules search directory
Open, Needs Triage by DeveloperPublic


System Information

Operating system: Mac OSX Catalina
Graphics card: None

Blender Version

Broken: Blender 2.82 (master)

Short description of error

When compiling Blender as a Python module on Mac OSX, an additional redundant directory is required for the Mac System to find the scripts/modules directory, called Resources. My understanding is that this is strictly for the OSX Packaging scheme for the Blender "bundle". I think that for creation as a Python module however, it should be sufficient to just place it in site-packages.

Reference here

Exact steps for others to reproduce the error


  1. Install Python from
  2. Install XCode

Build Steps

NOTE: Audaspace errors with various numpy array object errors, OpenMP also cannot be built on OSX

export PATH="/Applications/":"$PATH"
echo PATH="/Applications/":"\$PATH" >> ~/.profile
mkdir .blenderpy
cd .blenderpy
mkdir master
cd master
git clone
cd blender
make update
cd ..
mkdir build_bpy_darwin_custom
cd build_bpy_darwin_custom
make install

Install Steps

python3 -m venv ~/.blenderpy/venv # Or wherever you want your venv

cp bin/ ~/.blenderpy/venv/lib/python3.7/site-packages

mkdir ~/.blenderpy/venv/python3.7/Resources
# Because of an OSX packaging scheme, Blender's script directory search was changed
# This above line is what the task is about

cp -R bin/2.82 ~/.blenderpy/venv/lib/python3.7/Resources

Additional Reading

NOTE: I am working on documenting various build errors with and caveats for using it at the blenderpy repo on GitHub. Through this I supply the bpy package also on PYPI, though if anyone has qualms with that I can take it down too.

Mac Support for