Skip to content

AttributeError: module 'nt' has no attribute '_add_dll_directory' #493

Description

@timfel

Reported by @JaroslavTulach

PS S:\windows> graalpy -m pip install numpy==1.26.4
Apr 01, 2025 7:13:16 AM org.graalvm.shadowed.org.jline.utils.Log logr
WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
Looking in indexes: https://pypi.org/simple, https://www.graalvm.org/python/wheels/
Requirement already satisfied: numpy==1.26.4 in s:\windows\npt\lib\site-packages (1.26.4)

but then, when I try to import numpy:

import numpy
print ("OK")

I get:

PS S:\windows> graalpy n.py
Apr 01, 2025 7:14:23 AM org.graalvm.shadowed.org.jline.utils.Log logr
WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
Traceback (most recent call last):
  File "S:\windows\n.py", line 1, in <module>
    import numpy
  File "S:\windows\npt\Lib\site-packages\numpy\__init__.py", line 111, in <module>
    _delvewheel_patch_1_10_0()
  File "S:\windows\npt\Lib\site-packages\numpy\__init__.py", line 108, in _delvewheel_patch_1_10_0
    os.add_dll_directory(libs_dir)
  File "S:\windows\bin\graalpy-community-24.2.0-windows-amd64\graalpy-community-24.2.0-windows-amd64\Lib\os.py", line 1119, in add_dll_directory
    cookie = nt._add_dll_directory(path)
AttributeError: module 'nt' has no attribute '_add_dll_directory'

Activity

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