Skip to content

Bug: Python bindings unable to find C binding DLL on Windows #4

@Daniel-McCarthy

Description

@Daniel-McCarthy

Description:

I'm attempting to use the python bindings for PINE and after building the libpine_c.dll from the C bindings as instructed, copying it into the location of the bindings python example.py script, and running it, it is unable to find the DLL.

Details:

Error:

FileNotFoundError: Could not find module 'C:\Users\<user>\Documents\Git\pine\bindings\python\libpine_c.dll' (or one of its dependencies).
Try using the full path with constructor syntax.

image

While the DLL file is verifiably at the exact location the script is searching for it, it says that it's not found. It appears to be related to the "(or one of its dependencies)". After further digging I found numerous cases of people experiencing this and people pointing to python 3.8 and higher on windows having a change. It appears to be Windows specific and specific to versions >= 3.8.0 of python. Although I have no solution as I am unsure of the dependencies or where they can be resolved from, I did want to bring this to attention.

This error occurs at L#19 of example.py upon loading the valid DLL path into ctypes.CDLL(...).

To work around this I have switched back to python 3.7.0 where with the exact same setup it is working as expected.

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