sublimehq/sublime_text

Some python modules from pypi fail importing on Windows.

Closed this issue · 1 comments

Description of the bug

related to packagecontrol/channel#29

While trying to check the package for dependencies and compatibility I found it being properly imported on Linux (Debian 12), but not on Windows 10/11.

Same package however works fine in dedicated python 3.8 interpreter.

I finally found it trying to load <ST>/python3.dll, which does not exist.

The issue can be fixed by placing Python for Windows' python3.dll to ST's installation directory.

While that's working I have no idea how a real fix would look like which remains working in the very theoretical case of another python-3.13 plugin host being added.

Steps to reproduce

  1. extract codemp-0.7.0-cp38-abi3-win_amd64.whl to data/Lib/python38
  2. Start ST in safe mode
  3. Open ST's console
  4. call import codemp

Expected behavior

Import working, module can be used.

Actual behavior

Module fails importing

>>> import codemp
Traceback (most recent call last):
  File "__main__", line 1, in <module>
  File "<ST>\Data\Lib\python38\codemp\__init__.py", line 1, in <module>
    from .codemp import *
ImportError: DLL load failed while importing codemp: Das angegebene Modul wurde nicht gefunden.

Sublime Text build number

4178

Operating system & version

Windows 10/11

(Linux) Desktop environment and/or window manager

No response

Additional information

No response

OpenGL context information

No response

Looks like a general issue with pyo3: PyO3/pyo3#3589. Given that pyo3 is just broken for venvs on Windows, I don't consider this a problem we should be solving on our end.