You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Win7x64下Python3.6+的pythonw.exe启动失败及安装报错求助

问题:Win7x64下Python3.6+及对应Anaconda版本安装运行异常

环境信息

  • 系统:Win7x64
  • 各磁盘可用空间≥20GB
  • Python3.5.2(官方版/Anaconda3-4.2.0自带)可正常运行
  • 已安装MSVC 2005-2022运行时库(x86/x64)

异常现象

官方Python3.6+版本

  • python.exe可正常运行,但pythonw.exe和IDLE无报错却无法启动

Anaconda3-2018至2021版本(对应Python3.6-3.8)

  1. Python3.6-3.7版本:触发APPCRASH REPORT pythonw.exe ucrtbase.DLL崩溃,崩溃信息:
    pythonw.exe 3.6.5150.1013 5abd3212 ucrtbase.DLL 10.0.16299.15 70f70cc4 40000015 000000000006b71f 6.1.7601.2.1.0.256.1 2052 7c91 7c91ffc054a06a19bae511ac86fd4989 1e3a 1e3a1cfe3de7d661be48e9d60cfb8b11
    
  2. Python3.7-3.8版本:安装时出现entry_point.py报错,日志如下:
    Extract: anaconda-2021.05-py38_0.tar.bz2
      0%|          | 0/339 [00:00<?, ?it/s]
      File "entry_point.py", line 69, in <module>
      File "concurrent\futures\process.py", line 674, in map
      File "concurrent\futures\_base.py", line 600, in map
      File "concurrent\futures\_base.py", line 600, in <listcomp>
      File "concurrent\futures\process.py", line 645, in submit
      File "concurrent\futures\process.py", line 584, in _start_queue_management_thread
      File "concurrent\futures\process.py", line 608, in _adjust_process_count
      File "multiprocessing\process.py", line 121, in start
      File "multiprocessing\context.py", line 327, in _Popen
      File "Lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_multiprocessing.py", line 83, in __init__
      File "multiprocessing\popen_spawn_win32.py", line 73, in __init__
    FileNotFoundError: [WinError 2] 
    [2964] Failed to execute script entry_point
    Collecting package metadata (current_repodata.json): ...working... done
    

已尝试的修复操作

  • 安装Win7x64补丁Windows6.1-KB2999226-x64
  • 删除HKLC及HKCU下的/SOFTWARE/PYTHON注册表项
  • 清理系统PATH及用户PATH中所有Python相关内容,当前PATH:
    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\PostgreSQL\pg10\bin;C:\Program Files (x86)\Google\Chrome\Application
    
    无PYTHONPATH、PYTHONHOME及用户PATH
  • 删除JDK的JAVAHOME环境变量
  • 执行anaconda clean --yes
  • 重新安装MSVC 2008-2022运行时库
  • 关闭所有杀毒软件
  • 重启计算机

修复后仍存在的问题

  1. Anaconda3-4.2.0(Python3.5.2)可正常运行,所有组件(python、ipython、idle、spyder、jupyter)均正常
  2. 安装Anaconda3-2019.07(Python3.7):
    • 接近完成时出现日志:
      DEBUG menuinst_win32:create(324): Shortcut cmd is d:\ProgramData\Anaconda3\python.exe, args are ['d:\\ProgramData\\Anaconda3\\cwp.py', 'd:\\ProgramData\\Anaconda3', 'd:\\ProgramData\\Anaconda3\\python.exe', 'd:\\ProgramData\\Anaconda3\\Scripts\\jupyter-notebook-script.py', '"%USERPROFILE%/"']
      
    • 随后弹出APPCRASH崩溃报告:
      APPCRASH
      python.exe
      3.7.3150.1013
      5cc0c771
      ucrtbase.DLL
      10.0.17134.12
      587decd7
      40000015
      000000000006e76f
      6.1.7601.2.1.0.256.1
      2052
      99f9
      99f9768885038458efd17b3ff3bc92c8
      eff0
      eff0e13a5c9d3da6d6b491ef4a5a8088
      
    • 关闭崩溃窗口后出现:
      WARNING conda.core.envs_manager:register_env(46): Unable to register environment. Path not writable or missing.
      
    • 运行python activate powershell时出现致命错误:
      initfsencoding... no module named 'encoding'
      
  3. 安装Anaconda3-2021.05(Python3.8):
    • entry_point.py阶段出现文件未找到错误,日志如下:
      Extract: anaconda-2021.05-py38_0.tar.bz2
        0%|          | 0/339 [00:00<?, ?it/s]
        File "entry_point.py", line 69, in <module>
        File "concurrent\futures\process.py", line 674, in map
        File "concurrent\futures\_base.py", line 600, in map
        File "concurrent\futures\_base.py", line 600, in <listcomp>
        File "concurrent\futures\process.py", line 645, in submit
        File "concurrent\futures\process.py", line 584, in _start_queue_management_thread
        File "concurrent\futures\process.py", line 608, in _adjust_process_count
        File "multiprocessing\process.py", line 121, in start
        File "multiprocessing\context.py", line 327, in _Popen
        File "Lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_multiprocessing.py", line 83, in __init__
        File "multiprocessing\popen_spawn_win32.py", line 73, in __init__
      FileNotFoundError: [WinError 2] 系统找不到指定的文件。
      [4780] Failed to execute script entry_point
      Collecting package metadata (current_repodata.json): ...working... done
      Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
      Collecting package metadata (repodata.json): ...working... done
      Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
      
    • 未生成开始菜单

当前状态

仅Anaconda3-4.2.0(Python3.5.2)可正常运行;官方发布版Python3.5-3.8均可安装,python.exe在CMD中可正常运行,但仅Python3.5的IDLE(依赖pythonw.exe)可启动,Python3.6+的IDLE点击后无反应、无报错。


解决建议

针对ucrtbase.DLL崩溃问题

  1. 补充Win7 UCRT核心补丁:除KB2999226外,安装Windows6.1-KB3118401-x64和Windows6.1-KB2919355-x64,这两个补丁是Win7支持新版Universal CRT的基础,Python3.6+依赖该组件运行。
  2. 修复UCRT文件完整性:若补丁安装后仍崩溃,可从Win10镜像提取ucrtbase.dll等UCRT相关文件,替换到C:\Windows\System32和C:\Windows\SysWOW64目录,替换前务必备份原文件。

针对Anaconda安装的FileNotFoundError问题

  1. 使用离线安装包:下载Anaconda完整离线镜像,避免在线安装时因网络或进程调用异常导致文件提取失败。
  2. 修改安装路径:将Anaconda安装到纯英文无空格路径(如D:\Anaconda3),避免路径特殊字符引发进程寻址错误。
  3. 提升安装权限:右键点击安装器选择“以管理员身份运行”,临时关闭用户账户控制(UAC),避免权限不足导致文件写入或进程启动失败。

针对pythonw.exe无法启动问题

  1. 手动启动排查报错:打开CMD切换到Python3.6+安装目录,执行pythonw.exe -m idlelib.idle > error.log 2>&1,将输出重定向到日志文件,查看隐藏的启动报错信息。
  2. 调整系统显示设置:尝试将系统默认字体改为微软雅黑,或把DPI设置调为100%,部分Win7系统的字体/DPI异常会导致pythonw.exe启动失败。

内容的提问来源于stack exchange,提问作者WilsonF

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.07 21:05:24