Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Python 3.11.0 -> 3.11.1 : ...\Python311\DLLs not added to sys.path in embedded startup on Windows #100320

Closed
Labels
3.11only security fixes3.12only security fixesOS-windowstype-bugAn unexpected behavior, bug, or error
@kxrob

Description

@kxrob

Bug report

When updating Python 3.11.0 -> 3.11.1 (or reverse to reverse the issue), the...\Python311\DLLs folder is suddenly not added anymore to sys.path in embedded startup due to somehow impaired search path algorithm. E.g. inPythonwin.exe. And thus things like ctypes, socket, hashlib etc. cannot be imported. But...\Python311\Lib and all the other paths are correctly there, just the DLLs path missing.

The same was observed e.g. here:
mhammond/pywin32#1995

The issue is also in current Py 3.12.0a3 at least.
The issue seems not to be withpython.exe startup.
The issue also disappears when I monkey-copy thePythonwin.exe next topython.exe and use that copy.

Note:Pythonwin.exe locates pythonNN.dll dynamically and does the usual Python init.

And extra confusing: in the registry there is aPythonPath key likeC:\Python312\Lib\;C:\Python312\DLLs\ :
I always thought that the DLLs path is taken from there. But when I edit-damage that likeC:\Python312\Lib\;C:\Python312\DLLsx\ e.g., it has no effect :-)
The correct DLLs dir (only) is still in the sys.path in the above working cases, andDLLsx also does not appear on sys.path in the non-working cases.

Reproduce:

  • Win10
  • pip install pywin32; run Pythonwin.exe
  • import ctypes and/or inspect sys.path after start.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.11only security fixes3.12only security fixesOS-windowstype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp