That used to be the very hacky and unclean way of getting it to work.
I have tested this just now and the current steps are as Campbell said. Since it now builds a proper module you can either add it to your PYTHONPATH
environment variable or to your sys.path
prior to import.
- Build the Python module
make bpy
- Open a terminal and run
python
to get the interpreter prompt -
import sys
and then append both the path to<some prefix>\build_windows_Bpy_x64_vc16_Release\bin\Release
and<some prefix>\build_windows_Bpy_x64_vc16_Release\bin\Releas\bpy
with calls tosys.path.append(<put string var here>)
. - Import the module with
import bpy
These steps are not necessary when the paths are in PYTHONPATH
since Python will already check there on its own (they are automatically getting added to sys.path
).
- Add paths to
PYTHONPATH
- Start a Python interpreter
- Use
import bpy