GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CYGWIN: fails to load modules, DLLs not found · Issue #148758 · python/cpython

CYGWIN: fails to load modules, DLLs not found #148758

New issue
Copy link
New issue
Copy link
Closed
Closed
CYGWIN: fails to load modules, DLLs not found#148758
Copy link
Labels
OS-unsupportedinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@carlo-bramini
carlo-bramini
opened on Apr 19, 2026
Issue body actions

Bug report

Bug description:

The process for building Python for CYGWIN is executed well until it reaches the very last steps.
Then, these messages will appear on the console:

[ERROR] _asyncio failed to import: No module named 'math'
[ERROR] Cannot mark builtin module '_asyncio' as failed!
[ERROR] _elementtree failed to import: No module named 'pyexpat'
[ERROR] _asyncio failed to import:
 No module named 'math'
[ERROR] Cannot mark builtin module '_asyncio' as failed!
[ERROR] _elementtree (/home/carlo/packages/python/cygwin/build/lib.cygwin-3.6.7-x86_64-3.15/_elementtree.cpython-315d.dll) is missing
Following modules built successfully but were removed because they could not be imported:
_asyncio              _elementtree

Checked 115 modules (36 built-in, 76 shared, 1 n/a on cygwin-3.6.7-x86_64, 0 disabled, 0 missing, 2 failed on import)

When running the newly created executable, you can also see these results:

$ ./python.exe
Python 3.15.0a8+ (heads/main-dirty:3ab94d6, Apr 19 2026, 15:54:58) [GCC 13.4.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
warning: can't use pyrepl: No module named 'unicodedata'
>>> import math
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
    import math
ModuleNotFoundError: Standard library module 'math' was not found
>>>

However, all modules are created correctly, by inspecting the content of the build directory.
In this screenshot, you can see it yourself:

Image

The error is inside the file dynload_shlib.c because it doesn't handle the correct suffixes for the DLL files to be loaded.
In the above screenshot, you can see that the name of the module is math.cpython-315d.dll and not math.dll.
This means that the current code won't be able to find them until the only option available inside _PyImport_DynLoadFiletab[] will be just .dll.
So, like for other platforms, adding the missing suffixes is required for loading things correctly.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Windows

Linked PRs

  • gh-148758: Fix dynamic loading file extensions for CYGWIN #148759

Activity

  1. carlo-bramini
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Apr 19, 2026
  2. carlo-bramini
    added a commit that references this issue on Apr 19, 2026

    pythongh-148758: Fix dynamic loading file extensions for CYGWIN

    132dc4a
  3. StanFromIreland
    added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    OS-unsupported
    on Apr 19, 2026
  4. github-project-automation
    added this to Unsupported platformson Apr 19, 2026
  5. vstinner
    added a commit that references this issue on May 13, 2026

    gh-148758: Fix dynamic loading file extensions for Cygwin (#148759)

    50476a7
  6. vstinner
    closed this as completedon May 13, 2026
  7. github-project-automation
    moved this to Done in Unsupported platformson May 13, 2026
  8. vstinner
    added a parent issue on May 15, 2026
    • Enhance Cygwin support #149879
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-unsupportedinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    • Unsupported platforms
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.