Newly installed Blender won't open in windows 10 due to python error #98131
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#98131
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows 10
Graphics card: GTX 970
Blender Version
Broken: 3.1.2
Short description of error
I have my own copy of Python installed (3.7). I downloaded and installed the official package from blender.org. Blender opens a window then closes. Opening with Powershell gets the following traceback:
Internal error initializing Python!
Fatal Python error: init_import_site: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
AttributeError: module 'importlib._bootstrap_external' has no attribute '_w_long'
This installation of python is the only one in my path and pythonpath variables. I experimented with forcing it to load ._bootstrap_external fresh from source, rather than the frozen version. This got me past this exception, but led to a new traceback that makes me think the underlying issue is a conflict between Blender's and my system's pythons:
Internal error initializing Python!
Fatal Python error: init_import_site: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
AttributeError: module 'io' has no attribute 'open_code'
Exact steps for others to reproduce the error
Download blender onto a windows machine with a local installation of Python 3.7.
Added subscriber: @joshdempster
Added subscriber: @mano-wii
Changed status from 'Needs Triage' to: 'Needs User Info'
Thanks for the report.
Could you confirm where you downloaded the Blender installer from?
Blender installer from https://www.blender.org/download/ already comes with a bundled python 3.10 (3.7 is not supported)
If you are not using the python 3.10 package in blender, it is to be expected that it will not work.
Yes, I downloaded it from blender.org/download. The problem is that Blender is using my system python, not the bundled python. Specifically, I suspect Blender is invoking the system python interpreter, then trying to use it to read in packages from the Blender bundled version, or vice versa.
Is it possible that Blender launches with a command like
instead of
? Just a guess.
Added subscriber: @LazyDodo
when you start bender using the
blender_factory_startup.cmd
batch file located next to blender.exe is it happier?Yup, that launches successfully. I attached the system info.blender_system_info.txt
Added subscriber: @ideasman42
blender_factory_startup.cmd clears the
PYTHONPATH
env variable before starting blender that's likely why it's starting, afaik blender is setup by default to ignore it unless you pass a very specific switch telling it not to, so i'm not entirely sure what's going on here, @ideasman42 any bright ideas?Using
PYTHONPATH
should be an exceptional case, if the PYTHONPATH is used anyway,PyPreConfig_InitIsolatedConfig
may not be working as it should.Committed a change that logs when
PYTHONPATH
expected to be used.With
ebb492a389
or newer (will be in the next daily build) please try run this from the terminal:blender --log "bpy.interface.*" --log-level 2
As well as:
blender --log "bpy.interface.*" --log-level 2 --python-use-system-env
The first command should ignore the PYTHONPATH and succeed in starting Blender.
The second may fail if PYTHONPATH points to an unsupported Python version.
Both commands should show a message:
... where
*with*
/*without*
depend on passing in the--python-use-system-env
argument.Please try an updated build and show the full output of both commands.
Added subscriber: @PratikPB2123
@joshdempster ^
Changed status from 'Needs User Info' to: 'Archived'
No activity for more than a week. As per the tracker policy we assume the issue is gone and can be closed.
Thanks again for the report. If the problem persists please open a new report with the required information.