0
$\begingroup$

I built Blender as a Python module on Ubuntu 20.04.

The installation instructions are not very clear.

  • I don't have a /usr/lib/python3.7/site-packages folder.
  • When I run make install it says: No rule to make target 'install'
$\endgroup$

1 Answer 1

0
$\begingroup$

Okay, I think I got it.

  • cd to ~/blender-git/build_linux_bpy and run make install
  • this will install to a local path (~/blender-git/lib/linux_centos7_x86_64/python/lib/python3.7/site-packages/2.91)
  • setting WITH_INSTALL_PORTABLE=OFF on the command line before the call to make install had no effect
  • ~/blender-git/build_linux_bpy/CMakeCache.txt defines the PYTHON_SITE_PACKAGES variable
  • I found this by running a search using grep -rnw . -e 'PYTHON_SITE_PACKAGES'
  • I set this PYTHON_SITE_PACKAGES to /usr/lib/python3/dist-packages
  • I chose that path from the list returned by python3 -m site
  • I can now import the bpy module from a python script

If anyone has a better way of doing this, let me know! Cheers.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .