Open ChanCheukPong opened 2 years ago
I've tried this in the past without much success. Originally I was going to have the bpy-build module be a factory for building the bpy module on different versions of Python by searching the Blender svn repository for the appropriate version of bpy to build on the appropriate version of Python.
The Blender Foundation does not tag their releases or their commits based on if bpy was able to be built however. Their reasoning for this is because bpy is not a supported feature of Blender.
So unfortunately, I don't have a way to build for older versions of Python besides using the bpy-build tools to search for the appropriate version, then try manually building that version one at a time. I apologize in advance because this step is so, so much trial and error and I have spent way too much time on it to justify looking into it anymore.
You could try and do something like this:
py -m venv venv venv\Source\activate py -m pip install bpy-build py
from bpy_build.sources import get_compatible_versions get_compatible_versions()
And then build each version one at a time using the "Building Blender as a Python module" guidance below, and asking on Blender Dev Talk when things go wrong.
Best of luck because this was very difficult when I last tried it!
https://wiki.blender.org/wiki/Building_Blender/Other/BlenderAsPyModule
On Fri, Nov 26, 2021, 2:52 AM ChanCheukPong @.***> wrote:
I am using Python 3.6 for my own project and I want to import blender as a python module. However I notice one of the requirements for blenderpy is that python version must be >=3.7. I also tried building blender myself and it worked for python 3.9, but not for python versions older than 3.7. Do you have any solutions for older python versions? Thank you so much!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/TylerGubala/blenderpy/issues/107, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFLEYR2C5WO227IKQJQYIH3UN44CDANCNFSM5I2BOXJA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Thank you very much for the quick response and suggestions. I will definitely try it out! Thanks a lot!
I am using Python 3.6 for my own project and I want to import blender as a python module. However I notice one of the requirements for blenderpy is that python version must be >=3.7. I also tried building blender myself and it worked for python 3.9, but not for python versions older than 3.7. Do you have any solutions for older python versions? Thank you so much!