在构建smpl人体模型时,涉及到需要将.pkl转换成.fbx,转换程序中涉及到了bpy的使用,一直安装不上。
记录下踩坑过程(满纸辛酸泪。
。
)
–搭建环境为双系统linux18.04
–主要参考的是这三个网站,官方的
(1) Building Blender on Ubuntu
(2) Building Blender as a Python Module
(3) Building Blender with CUDA and Optix
在刚刚进行第(2)个的时候报错了:
make bpy
Configuring Blender in “/home/milan/blender-git/build_linux_bpy” …
loading initial cache file /home/milan/blender-git/blender/build_files/cmake/config/bpy_module.cmake
– The CXX compiler identification is GNU 7.5.0
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Found Git: /usr/bin/git (found version “2.17.1”)
– Performing Test SUPPORT_NEON_BUILD
– Performing Test SUPPORT_NEON_BUILD - Failed
– Performing Test SUPPORT_SSE_BUILD
– Performing Test SUPPORT_SSE_BUILD - Success
– Performing Test SUPPORT_SSE2_BUILD
– Performing Test SUPPORT_SSE2_BUILD - Success
CMake Error at build_files/cmake/platform/platform_unix.cmake:25 (message):
GCC version must be at least 9.3 for precompiled libraries, found 7.5.0
Call Stack (most recent call first):
CMakeLists.txt:1005 (include)
– Configuring incomplete, errors occurred!
See also “/home/milan/blender-git/build_linux_bpy/CMakeFiles/CMakeOutput.log”.
See also “/home/milan/blender-git/build_linux_bpy/CMakeFiles/CMakeError.log”.
GNUmakefile:322: recipe for target ‘all’ failed
make: *** [all] Error 1
考虑到是GCC版本问题,我已经有GCC7.5了,而且这个版本是默认的,也是推荐的,那我能不能换成GCC9呢?我就试了试这个: how-to-install-gcc-compiler-on-ubuntu-18-04
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt install gcc-7 g++-7 gcc-8 g++-8 gcc-9 g++-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9
然后得到:
gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~18.04) 9.4.0
Copyright © 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
另我还找到GCC的版本 https://gcc.gnu.org/releases.html
但是运行的时候还是会报错说GCC版本不对。
到现在为止在这上面浪费的时间已经太多了…
留下搜索到的一些问答,有解决的朋友可以告知一下
在 linux 上构建最新的无头 CUDA 的问题:找不到可接受的 g++ 版本
CUDA (Linux) 的 GCC 版本错误 – 如何解决
如何解决 gcc 和 CUDA 相关的问题
现在为止直接运行的话是这样的:
./blender -b -P /home/milan/Desktop/VIBE_yolov5/lib/utils/fbx_output.py – --input output/sample_video/vibe_output.pkl --output output/sample_video/vibe_output.fbx --fps_source 30 --fps_target 30 --gender male
Blender 2.83.0 (hash 211b6c29f771 built 2020-06-03 14:41:25)
Read prefs: /home/milan/.config/blender/2.83/config/userpref.blend
found bundled python: /home/milan/Downloads/blender-2.83.0-linux64/2.83/python
Traceback (most recent call last):
File “/home/milan/Desktop/VIBE_yolov5/lib/utils/fbx_output.py”, line 32, in
import joblib
ModuleNotFoundError: No module named ‘joblib’
Blender quit
但是,当在blender里对python文件加入软链接(指向自定义的anaconda环境),在blender执行文件处运行我的程序时得到这种报错:
./blender -b -P /home/milan/Desktop/VIBE_yolov5/lib/utils/fbx_output.py – --input output/sample_video/vibe_output.pkl --output output/sample_video/vibe_output.fbx --fps_source 30 --fps_target 30 --gender male
Blender 2.83.0 (hash 211b6c29f771 built 2020-06-03 14:41:25)
found bundled python: /home/milan/Downloads/blender-2.83.0-linux64/2.83/python
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named ‘encodings’
Current thread 0x00007f6d8a7a2040 (most recent call first):
Aborted (core dumped)
怀疑是我链接的这个python文件由于路径问题,没配置好
但又不知道添加哪个路径,因为我在blender的python文件夹里找不到python的可执行文件
这个问题先这么留着>>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)