【发布时间】:2019-04-09 13:50:16
【问题描述】:
当我将 bpy 导入 python 时,我得到以下错误代码,这是因为我需要安装搅拌机,或者我可以用另一种方式解决这个问题'
Color management: using fallback mode for management
BLT_lang_init: 'locale' data path for translations not found, continuing
AL lib: (EE) UpdateDeviceParams: Failed to set 44100hz, got 48000hz instead
bpy: couldnt find 'scripts/modules', blender probably wont start.
Freestyle: couldn't find 'scripts/freestyle/modules', Freestyle won't work properly.
ModuleNotFoundError: No module named 'bpy_types'
ModuleNotFoundError: No module named 'bpy_types'
ERROR (bpy.rna): c:\users\tgubs\.blenderpy\blender\source\blender\python\intern\bpy_rna.c:6662 pyrna_srna_ExternalType: failed to find 'bpy_types' module
ModuleNotFoundError: No module named 'bpy_types'
ModuleNotFoundError: No module named 'bpy_types'
ERROR (bpy.rna): c:\users\tgubs\.blenderpy\blender\source\blender\python\intern\bpy_rna.c:6662 pyrna_srna_ExternalType: failed to find 'bpy_types' module
ModuleNotFoundError: No module named 'bpy_types'
ERROR (bpy.rna): c:\users\tgubs\.blenderpy\blender\source\blender\python\intern\bpy_rna.c:6662 pyrna_srna_ExternalType: failed to find 'bpy_types' module
F1106 16:58:18.372622 23956 utilities.cc:322] Check failed: !IsGoogleLoggingInitialized() You called InitGoogleLogging() twice!
*** Check failure stack trace: ***
【问题讨论】:
-
Blender 包含并使用它自己的 python 解释器。通常,blender 被告知直接运行其脚本,无论是在 GUI 中还是在后台使用来自 the CLI 的
blender --background --python script.py。 build blender as a python module 可以在标准的python解释器中导入。