Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fbx_sdk install manual] if you stucked in install fbx_sdk for import fbx or other files. check this #61

Closed
hhebb opened this issue Sep 16, 2023 · 4 comments

Comments

@hhebb
Copy link

hhebb commented Sep 16, 2023

finally i installed fbx sdk in my machine.
it was not easy, so those who suffering to install fbx_sdk, i hope this helps.
i wrote that manual with many googling and trial.

environment

* Ubuntu 20.04 LTS
* python 3.8.10
  1. download and install fbx sdk
    • fbx sdk
      • version
        • 202032
      • tar file download path
        • ./<YOUR_FBXSDK_PATH>/
      • instruction
        • cd <YOUR_FBXSDK_PATH>
        • tar zxvf fbx202032_fbxsdk_linux.tar.gz
        • ./fbx202032_fbxsdk_linux.tar.gz
        • export FBXSDK_ROOT=<YOUR_FBXSDK_PATH>
      • you should check env param
    • fbx python binding
      • version
        • 202032
      • tar file download path
        • ./YOUR_FBX_PYTHON_BINDING_PATH/
      • instruction
        • cd <YOUR_FBX_PYTHON_BINDING_PATH>
        • tar zxvf fbx202032_fbxpythonbindings_linux.tar.gz
        • ./fbx202032_fbxpythonbindings_linux.tar.gz
    • reference
  2. sip - build tool
  3. sdk build
    • cd <YOUR_FBX_PYTHON_BINDING_PATH>
    • python PythonBindings.py Python3_x64 buildsip
    • when get problem with lxml
      • sudo apt insatll libxml2-dev
      • python PythonBindings.py Python3_x64 buildsip
  4. modify make file and re-install
    • there is possibility of error when import fbx after first build.

    • cd <YOUR_FBX_PYTHON_BINDING_PATH>/build/Python38_x64

    • make clean

    • open make file and modify

      from
      
      LIBS = -L/workspace/CALM/fbxsdk/lib/gcc/x64/release -lz -lxml2 /workspace/CALM/fbxsdk/lib/gcc/x64/release/libfbxsdk.a
      
      to
      
      LIBS = -L/workspace/CALM/fbxsdk/lib/gcc/x64/release /workspace/CALM/fbxsdk/lib/gcc/x64/release/libfbxsdk.a -lz -lxml2
      
    • make install

    • files are created in <YOUR_FBX_PYTHON_BINDING_PATH/build/Distrib/site-packages/fbx> after installing

      • fbx.so
      • FbxCommon.py
      • fbxsip.so
    • and file is copied to <YOUR_PIP_PATH>/site-packages

      • fbx.so
  5. add sys path to your .py file
    • the package paths are not added to python sys.path, you should add path manually.

    • maybe i should move<YOUR_FBX_PYTHON_BINDING_PATH/build/Distrib/site-packages/fbx> to my python site-package. and maybe don't need this step.

      import sys
      sys.path.append('<YOUR_FBX_PYTHON_BINDING_PATH>/build/Distrib/site-packages/fbx/')
      ...
    • now you can successfully import fbx, FbxCommon packages.

  6. other reference
@ziyanx02
Copy link

I get /usr/bin/ld: cannot find -lz as well as /usr/bin/ld: cannot find -lxml2 while building pythonbindings. It's caused by the missing of both zlib and libxml2 (not sure if it's common to miss libz). The problem can be solved by sudo apt install zlib1g-dev libxml2-dev.
It took me some time to find out which package -lz stands for, so I comment here for those who may stuck on the same problem as me.

@xiaohu-art
Copy link

Error: FBX library failed to load - importing FBX data will not succeed. Message: No module named 'fbxsip'

@Hellod035
Copy link

Error: FBX library failed to load - importing FBX data will not succeed. Message: No module named 'fbxsip'

I also encountered the same problem in Ubuntu 22.04. Is there any solution?

@shijiyuanaa
Copy link

Error: FBX library failed to load - importing FBX data will not succeed. Message: No module named 'fbxsip'

I also encountered the same problem in Ubuntu 22.04. Is there any solution?

after modifying the Makefile, run sudo make before make install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants