Sorry for the thread necromancy, but this problem seems to have re-emerged with the 2017.0.1 version of the library. Using Python 2.7.2, I get:
Python 2.7.2 (default, Aug 5 2013, 11:17:29) [GCC 4.0.1 (Apple Inc. build 5494)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import FbxCommon Traceback (most recent call last): File "<stdin>", line 1, in <module> File "FbxCommon.py", line 1, in <module> from fbx import * ImportError: dynamic module does not define init function (initfbx)
Every Google result I can find for this error is somebody attempting to make a native code library, and in every single case the root problem is something wrong with the native library, not with how it's being imported by Python. So that, combined with the fact that you previously had this problem with an earlier version of this library, leads me to strongly suspect this is a bug in the FBX SDK. Though it's confusing to me how such a bug could have shipped and remained out there this long, given that this should render the Mac Python 2.7 FBX SDK completely unusable.
If it's useful, I'm testing on a mid-2012 Retina MacBook Pro, running OS X 10.11.3.
Hi,
I've double checked on my machine if there were issues with the recently shipped FBX Python SDKs but found none. The fbxsip.so file seems to be compatible and loads without any problem. I personally tested on a machine running
Mac OS 10.8.5 (12F45)
Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64
Here is my output (note that line 1 of FbxCommon.py is exactly: from fbx import *):
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from fbx import *
>>>
Python 3.3.2 (v3.3.2:d047928ae3f6, May 13 2013, 13:52:24)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from fbx import *
>>>
We have been building the fbxsip.so with the official Python 2.7.3 release for quite some time now.
I've noticed in your post that your Python 2.7.2 build date (default, Aug 5 2013) is more recent than the default Python 2.7.3. Looks like you are using a custom build of Python 2.7.2 (the official release was: Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34). Maybe your build was not properly configured ?
If you have more info that could help narrow down the possible causes, please don't hesitate to share it.
The Python version we're using is not meaningfully modified. We just have a custom bug fix in the network module.
We are running a very different version of OS X. I don't think that matters, but I have no idea what other meaningful differences might exist.
Can't find what you're looking for? Ask the community or share your knowledge.