Skip to content

Loading _sqlite3 fails with MSYSTEM not set and /bin not in PATH #141

Closed

Description

@lazka

Noticed because this makes one test in the meson test suite fail:

git clone https://github.com/mesonbuild/meson
cd meson
MSYSTEM= python3 run_unittests.py -n0 test_vsenv_option

With Python 3.11.4 and empty MSYSTEM things fail:

$ PATH= MSYSTEM= /ucrt64/bin/python3.exe -c "import _sqlite3; print(_sqlite3)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: DLL load failed while importing _sqlite3: The specified module could not be found.

$ PATH= /ucrt64/bin/python3.exe -c "import _sqlite3; print(_sqlite3)"
<module '_sqlite3' from 'C:/msys64/ucrt64/lib/python3.11/lib-dynload/_sqlite3.cp311-mingw_x86_64_ucrt.pyd'>

With Python 3.10.12 both cases work:

$ PATH= MSYSTEM= /ucrt64/bin/python3.exe -c "import _sqlite3; print(_sqlite3)"
<module '_sqlite3' from 'C:\\msys64\\ucrt64\\lib\\python3.10\\lib-dynload\\_sqlite3.cp310-mingw_x86_64_ucrt.pyd'>

$ PATH= /ucrt64/bin/python3.exe -c "import _sqlite3; print(_sqlite3)"
<module '_sqlite3' from 'C:/msys64/ucrt64/lib/python3.10/lib-dynload/_sqlite3.cp310-mingw_x86_64_ucrt.pyd'>

Activity

  1. lazka commented on Jul 28, 2023

    @lazka
    MemberAuthor

    @naveen521kk do you have any ideas?

    I guess related to getpath.py?

  2. lazka commented on Jul 28, 2023

    @lazka
    Author
  3. changed the title [-]Loading pyd modules fails with MSYSTEM not set and /bin not in PATH[/-] [+]Loading _sqlite3 fails with MSYSTEM not set and /bin not in PATH[/+] on Jul 28, 2023
  4. lazka commented on Jul 28, 2023

    @lazka
    MemberAuthor

    I've created a meson branch to skip the failing test, in case we update before this is fixed: https://github.com/lazka/meson/tree/msys2-python311-upgrade

    edit: we did, so mesonbuild/meson#12049

  5. 54 remaining items

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions