Community
FBX Forum
Welcome to Autodesk’s FBX Forums. Share your knowledge, ask questions, and explore popular FBX topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

python fbx 2013.2: problem with osx 64bit

8 REPLIES 8
Reply
Message 1 of 9
simone.baldissini
499 Views, 8 Replies

python fbx 2013.2: problem with osx 64bit

On OSX, the fbx python installer (2013.2) has the sip.so library for python only with i386 architecture.
This precludes the use of fbx with python at 64bit.

With 2013.1:

$ file lib/Python26/sip.so
lib/Python26/sip.so: Mach-O 64-bit bundle x86_64
$ file lib/Python31/sip.so
lib/Python31/sip.so: Mach-O 64-bit bundle x86_64

With 2013.2 (also tested with 2013.3 beta):
$ file lib/Python26/sip.so
lib/Python26/sip.so: Mach-O bundle i386
$ file lib/Python31/sip.so
lib/Python31/sip.so: Mach-O bundle i386

I'm using osx 10.8 and python is at 64bit.

If I try to use python with 32bit I have this error:

$ export VERSIONER_PYTHON_PREFER_32_BIT=yes
$ python
Python 2.7.2 (default, Jun 20 2012, 16:23:33)
on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import fbx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dynamic module does not define init function (initfbx)
8 REPLIES 8
Message 2 of 9

Thanks for your report, we will fix this asap! Thanks!
Robert Goulet, FBX Dev Lead
Message 3 of 9

Just letting you know that this issue has been resolved, and will be part of the upcoming FBX 2013.3 release, which should be released in a few weeks.
Robert Goulet, FBX Dev Lead
Message 4 of 9

I downloaded the FBX 2013.3 RC (PR18) but sip.so is only for i386 (32bit) architecture (both python 2.6 and 3.1)

On FBX 2013.1 sip.so is for x86_64 and is 110984 bytes for python 2.6 and 106664 bytes for python 3.1.
On FBX 2013.3 sip.so is for i386 and is 84720 bytes for python 2.6 and 84528 bytes for python 3.1.

I try to build sip manually from source but does not seem to work with fbx.

Sip.so on 2013.2 is the same (tested with diff) of 2013.3.

Fbx.so is for both x86_64 and i386 but don't works forcing i386 mode (ImportError: dynamic module does not define init function (initfbx)).

I don't have a mac with 32bit system to test so I don't know if the 32bit problem is only on 64bit system or in all. I'm on ox 10.8.1.
Thanks
Message 5 of 9

You don't need a 32bit system to test this. In fact, it is the build of Python that would change. There's Python 32 and 64bit available. That's why we offer universal binaries for this. The issue you reported is found in FBX 2013.2, as well as all betas and RC of FBX 2013.3. The fix will be available in FBX 2013.3 Release (final) upcoming shortly.
Robert Goulet, FBX Dev Lead
Message 6 of 9

Hi, I'm seeing this exact same problem, but with the 2013.3 version of the Python module. I'm on OSX Lion (10.8.3) running a 32 bit version of Python (I've checked this in the Activity Monitor). I've tried it with both Python 2.6 and 3.1 but have had no success with either.


Attempting to import the module into 2.6;

Stevens-Mac-mini:Versions Steve$ python2.6
Python 2.6.6 (r266:84374, Aug 31 2010, 11:00:51)
on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import fbx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dynamic module does not define init function (initfbx)
>>>


Attempting to import the module into 3.1;

Stevens-Mac-mini:Versions Steve$ python3.1
Python 3.1.4 (v3.1.4:c918ec9f3a76, Jun 11 2011, 14:37:17)
on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import fbx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dynamic module does not define init function (PyInit_fbx)
>>>

Any help would be appreciated.

Regards,
Steve
Message 7 of 9
herufeanor
in reply to: Steve Monks

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.

 

Message 8 of 9
regalir
in reply to: herufeanor

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.

 

Message 9 of 9
herufeanor
in reply to: regalir

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.

Post to forums  

Autodesk Design & Make Report