Skip to content

[pywebview] pythonnet cannot be loaded #1817

@SHDocter

Description

@SHDocter

pywebview version: 6.2.1

When using Nuitka for packaging, an ImportError occurs: ImportError: cannot import name 'win32' from 'webview.platforms'

build command: uv run nuitka --onefile main.py --product-name=test --product-version=1.0.0 --copyright=test --output-dir=dist --output-filename=test.exe --no-deployment-flag=excluded-module-usage

If not --no-deployment-flag=excluded-module-usage:

ImportError: Module 'webview.platforms.win32' was actively excluded from Nuitka compilation.
Disable with '--no-deployment-flag=excluded-module-usage': Platforms package of webview used on 'Windows'.

But when I rolled back to version 6.2 , there was no such issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions