[Python] How to fix error when importing the blender module in Python

Discussão em 'Python' iniciado por Stack, Maio 14, 2025.

  1. Stack

    Stack Membro Participativo

    I get the following error code when I import bpy into Python. Is this because I need blender installed or can I solve this problem another way?

    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: ***

    Continue reading...

Compartilhe esta Página