Are there updated instructions on how to build Blender as a module?

I’m having trouble with the final step of building Blender as a module (the aim is to get bpy autocompletion in Elcipse working, which I managed to a while ago) on Linux (Ubuntu 18.04). I can build the module just fine using make bpy, but the installation step fails with the following error message:

file INSTALL cannot make directory
"/usr/local/PYTHON_SITE_PACKAGES-NOTFOUND/2.79/scripts": No such file or directory

Obviously, the make command can not identify the correct site-package folder on my system.

now, every helpful comment out there points to the following Wiki page:
which was working fine before the Wiki had been moved to the new location. Now, all the info there is missing unfortunately.

Can anyone point me to the instructions on how to complete the installation process?

Just found a way to do it, but it’s only a workaround:

  • locate the site-package folder: Run python3 -m site in a Terminal to see the options. Copy the USER_SITE folder to the clipboard or write it down. Make sure that this folder exists on your system, python should print (exists) next to it. If not, create it!
  • navigate to the compilation folder, in my case that’s ~/blender-git/build_linux_bpy
  • use sudo gedit CMakeCache.txt to edit the compile instructions
  • locate PYTHON_SITE_PACKAGES:FILEPATH in that textfile
  • edit the line to a valid (and existing!!!) site-package folder, for instance PYTHON_SITE_PACKAGES:FILEPATH=/home/yourUserName/.local/lib/python3.6/site-packages
  • save CMakeCache.txt
  • from within the compilation folder, run sudo make install

Now you should be able to run python3.6 followed by import bpy from the terminal.

1 Like