python - 在 Python 中导入搅拌机模块时如何修复错误
问题描述
当我将 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: ***
解决方案
您需要将2.79
文件夹移动到包含 python 可执行文件的目录。
只需进入您的 python 环境,进入 Scripts 目录,2.79
从那里剪切文件夹并将其粘贴到包含 Conda Python 可执行文件的文件夹中。问题是版本文件夹(2.79
当前)必须是 Python 可执行文件的兄弟。由于您所处的任何环境都没有位于脚本( ,等)python.exe
旁边的文件,因此它正在抱怨,因为路径应该是(相对于尝试导入它的当前)并且找不到它.pip
venv
bpy_types
./2.79/scripts/modules/bpy_types.py
python.exe
Windows 是一个已知平台,其中这些脚本文件可能会有所不同,尤其是取决于您的环境。
简而言之:
找到文件夹2.79
从当前位置剪切它粘贴到包含的文件夹中python.exe
请看这个问题
推荐阅读
- linux - 自动接受“配置 iptables-persistent”
- primeng - 使树表中的切换列持久化
- java - java.lang.annotation.AnnotationFormatError 当我在 spring mvc 中使用验证时发生
- mysql - 嵌套SELECT计算两个表的平均值
- angular - 如何在 Angular Material 6 中为表格创建分页?
- rest - 用户的 REST 路由资源
- ios - 如何将视频文件发送到 ios 中的 Firebase 存储
- android - 是否可以在 JSON 文件中使用 Android 资源引用
- java - ElasticSearch - JavaApi 按每个字符而不是术语(单词)搜索
- mysql - 关于 wordpress 的许多查询和缓慢的服务器响应