Hi Everyone,
I have been trying to build the FBX SDK, with the Python bindings so I can write some plugins in Python that directly interact with raw FBX data.
Any help would be greatly appreciated
I have been trying a few different approaches, each end me up with failure.
The following are the setup steps I take,
OS: Ventura 13.5.2 (22G91)
Macbook Air M1
Python 3.9.7
Setup Process
Error Message
```
FBXPythonBindings % python3 PythonBindings.py Python3_ub buildsip
=> SRC PYTHON : /Users/Shared/TEMP_DELETE/FBXPythonBindings
=> SCRIPT PATH : /Users/Shared/TEMP_DELETE/FBXPythonBindings
=> BUILD PATH : /Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub
=> SDK Headers : ['/Users/Shared/TEMP_DELETE/FBX SDK/2020.3.2/include']
=> Machine Type : arm64
=> LIB PATH : ['/Users/Shared/TEMP_DELETE/FBX SDK/2020.3.2/lib/clang/release']
=> PLATFORM TAG : FBX_X86_X64
=> SIP : /Users/Shared/TEMP_DELETE/sip-4.19.25
=>
=> -=[ Build SIP Module ]=-
=>
=> CURRENT DIR : /Users/Shared/TEMP_DELETE/sip-4.19.25
=> RUN COMMAND : "/Library/Frameworks/Python.framework/Versions/3.9/bin/python3" configure.py -b /Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub -d /Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub --arch=x86_64 -e /Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub
This is SIP 4.19.25 for Python 3.9.7 on darwin.
The SIP code generator will be installed in
/Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub.
The sip.h header file will be installed in
/Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub.
The sip module will be installed in
/Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub.
The sip.pyi stub file will be installed in
/Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub.
The default directory to install .sip files in is
/Library/Frameworks/Python.framework/Versions/3.9/share/sip.
MacOS/X binaries will be created for x86_64.
Creating sipconfig.py...
Creating top level Makefile...
Creating sip code generator Makefile...
Creating sip module Makefile...
=> RUN COMMAND : make clean
rm -f sip
rm -f main.o
rm -f transform.o
rm -f gencode.o
rm -f extracts.o
rm -f export.o
rm -f type_hints.o
rm -f heap.o
rm -f parser.o
rm -f lexer.o
rm -f sip.so
rm -f siplib.o
rm -f apiversions.o
rm -f descriptors.o
rm -f qtlib.o
rm -f threads.o
rm -f objmap.o
rm -f voidptr.o
rm -f array.o
rm -f int_convertors.o
rm -f bool.o
=> RUN COMMAND : make
cc -c -pipe -arch x86_64 -Os -Wall -W -DNDEBUG -I. -o main.o main.c
cc -c -pipe -arch x86_64 -Os -Wall -W -DNDEBUG -I. -o transform.o transform.c
cc -c -pipe -arch x86_64 -Os -Wall -W -DNDEBUG -I. -o gencode.o gencode.c
cc -c -pipe -arch x86_64 -Os -Wall -W -DNDEBUG -I. -o extracts.o extracts.c
cc -c -pipe -arch x86_64 -Os -Wall -W -DNDEBUG -I. -o export.o export.c
cc -c -pipe -arch x86_64 -Os -Wall -W -DNDEBUG -I. -o type_hints.o type_hints.c
cc -c -pipe -arch x86_64 -Os -Wall -W -DNDEBUG -I. -o heap.o heap.c
cc -c -pipe -arch x86_64 -Os -Wall -W -DNDEBUG -I. -o parser.o parser.c
cc -c -pipe -arch x86_64 -Os -Wall -W -DNDEBUG -I. -o lexer.o lexer.c
c++ -headerpad_max_install_names -arch x86_64 -o sip main.o transform.o gencode.o extracts.o export.o type_hints.o heap.o parser.o lexer.o
cc -c -pipe -fPIC -arch x86_64 -Os -Wall -W -DNDEBUG -I. -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -o siplib.o siplib.c
cc -c -pipe -fPIC -arch x86_64 -Os -Wall -W -DNDEBUG -I. -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -o apiversions.o apiversions.c
cc -c -pipe -fPIC -arch x86_64 -Os -Wall -W -DNDEBUG -I. -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -o descriptors.o descriptors.c
cc -c -pipe -fPIC -arch x86_64 -Os -Wall -W -DNDEBUG -I. -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -o qtlib.o qtlib.c
cc -c -pipe -fPIC -arch x86_64 -Os -Wall -W -DNDEBUG -I. -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -o threads.o threads.c
cc -c -pipe -fPIC -arch x86_64 -Os -Wall -W -DNDEBUG -I. -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -o objmap.o objmap.c
cc -c -pipe -fPIC -arch x86_64 -Os -Wall -W -DNDEBUG -I. -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -o voidptr.o voidptr.c
cc -c -pipe -fPIC -arch x86_64 -Os -Wall -W -DNDEBUG -I. -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -o array.o array.c
cc -c -pipe -fPIC -arch x86_64 -Os -Wall -W -DNDEBUG -I. -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -o int_convertors.o int_convertors.c
c++ -c -pipe -fPIC -arch x86_64 -Os -Wall -W -DNDEBUG -I. -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -o bool.o bool.cpp
c++ -headerpad_max_install_names -bundle -undefined dynamic_lookup -arch x86_64 -o sip.so siplib.o apiversions.o descriptors.o qtlib.o threads.o objmap.o voidptr.o array.o int_convertors.o bool.o
=> RUN COMMAND : make install
cp -f sip /Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub/sip
cp -f /Users/Shared/TEMP_DELETE/sip-4.19.25/siplib/sip.h /Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub/sip.h
cp -f sip.so /Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub/sip.so
cp -f /Users/Shared/TEMP_DELETE/sip-4.19.25/sip.pyi /Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub/sip.pyi
cp -f sipconfig.py /Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub/sipconfig.py
cp -f /Users/Shared/TEMP_DELETE/sip-4.19.25/sipdistutils.py /Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub/sipdistutils.py
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 /Users/Shared/TEMP_DELETE/sip-4.19.25/mk_distinfo.py "" /Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub/sip-4.19.25.dist-info installed.txt
=> CURRENT DIR : /Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub
=> Sipconfig Path : /Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub
=>
=> -=[ Build FBX Module ]=-
=>
=> RUN COMMAND : "/Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub/sip" -o -t FBX_X64 -c /Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub -b /Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub/fbx_module.sbf -I /Users/Shared/TEMP_DELETE/FBXPythonBindings/sip /Users/Shared/TEMP_DELETE/FBXPythonBindings/sip/fbx_module.sip
sip: /Users/Shared/TEMP_DELETE/FBXPythonBindings/sip/fbxtypes.sip:32: syntax error
Error: Unable to open
"/Users/Shared/TEMP_DELETE/FBXPythonBindings/build/Python39_ub/fbx_module.sbf"
```
Hi Autodesk FBX Team,
Just pinging this again, hoping someone there uses a OSX and can help.
Kind regards,
Simon
Hi, apologies for the long delay!
Sip 4.19 has became too old and hard to use. For this reason, in the last release of the FBX SDK (2020.3.4) we have migrated the FBX Python Bindings to use sip 6.x and we simplified the process by using pip to make the package. May I suggest you download the FBX SDK 2020.3.4 and the FBX Python Bindings 2020.3.4 for MacOS. Unfortunately, we discovered some issues with the package (python bindings) that will be resolved on the next release. In the meantime, I can give you a "patch" to fix it. So, here we go:
Python should now try to build the bindings library. Below is an example of output on my Mac M1 machine:
% python3 -m pip install .
Defaulting to user installation because normal site-packages is not writeable
Processing /Users/temp/FBXPythonBindings
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: fbx
Building wheel for fbx (pyproject.toml) ... done
Created wheel for fbx: filename=fbx-2020.3.4-cp311-cp311-macosx_10_15_arm64.whl size=3433863 sha256=a26b83a914023a07a870dd724e30c22abe27f304b828ac35213d25dfaf2b66df
Stored in directory: /private/var/folders/5v/8mw_67mx7jd12kt9c9xb33g80000gv/T/pip-ephem-wheel-cache-8xa2o1f8/wheels/6f/a4/08/3c8d470f21befc6d62787f6d53a55c310336400cf22aa1e8a2
Successfully built fbx
Installing collected packages: fbx
Attempting uninstall: fbx
Found existing installation: fbx 2020.3.4
Uninstalling fbx-2020.3.4:
Successfully uninstalled fbx-2020.3.4
Successfully installed fbx-2020.3.4
Hope this helps!
Thank you for the helpful reply. I will give this a try and let you know how it goes
Can't find what you're looking for? Ask the community or share your knowledge.