7

I am trying to use the FBX converter tool, located in the utils/converters/fbx/ folder, of the three.js project located here:

https://github.com/mrdoob/three.js/

I have installed the FBX SDK Python 2013.3 bindings (at least I think I did that part correctly)

And I have Python 2.6 installed to C:\Python26

I copied the "FBX SDK" folder into C:\Pythons26\Lib\site-packages from C:\Program Files\Autodesk\FBX

But when I run the following command:

converty_to_threejs.py my_fbx_file.fbx test_output_file.js

I get the following error:

Could not locate the python FBX SDK! You need to copy the FBX SDK into your python install folder such as "Python26/Lib/site-packages" folder.

I also made sure that C:\Python26 was added to my PATH system variable.

Does anyone have any idea why it wouldn't be able to find the FBX SDK folder? I put it exactly where it wants it, but it won't find it.

Thanks in advance!

4 Answers4

4

You need to copy some of the contents out of the Autodesk Python SDK into a directory that is in your PYTHONPATH environment variable (or update your PYTHONPATH to include the Autodesk SDK).

ex. Mac OS X (Yosemite)

In the case of OS X Yosemite, neither /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages or /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages were actually in my PYTHONPATH. So I added the following to my ~/.bash_profile:

# Python 2.7
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH

and copied the contents of /Applications/Autodesk/FBX\ Python\ SDK/2015.1/lib/Python27 (FbxCommon.py, fbx.so, fbxsip.so) into /usr/local/lib/python2.7/site-packages.

Windows etc.

The same logic used on Mac OS X can be applied on other platforms i.e. copy FbxCommon.py (and any other files in the same directory - DLLs etc.) into a directory in your PYTHONPATH.

Benjamin Dobell
  • 4,042
  • 1
  • 32
  • 44
3

don't copy the folder FBX SDK, copy the content into C:\Pythons26\Lib\site-packages such as: cp [FBX_SDK_ROOT]/lib/Python26_x64/* /usr/lib/python2.6/site-packages/ It works for me.

Bright
  • 31
  • 4
1

Mac Os X

Download FBX SDK and copy

/Applications/Autodesk/FBX\ Python\ SDK/2016.1/lib/Python27

to

/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7

gnou
  • 1,282
  • 1
  • 10
  • 11
  • Make sure you copy the _contents_ of /Python27 (fbx.so, FbxCommon.py, fbxsip.so) into the python folder: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 – robshearing Mar 08 '16 at 23:05
0

On MacOS, I also had the same problem:

Could not locate the python FBX SDK!
You need to copy the FBX SDK into your python install folder such as "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages" folder.

I have copied fbx.so, FbxCommon.py, and sip.so from SDK_PATH/2014.1/lib/Python2.6/ to /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages.

Andrew Aylett
  • 39,182
  • 5
  • 68
  • 95
Ellis
  • 1
  • I have copied the files in the above mentioned folder but I still get the same error. any clue.. – jainam Dec 11 '14 at 14:22
  • Just ran into this myself. Been literally over a year since you had the problem so hopefully you worked it out! But nonetheless please see my answer for the solution (re: PYTHONPATH). – Benjamin Dobell Feb 20 '15 at 04:20