pupil-labs / apriltags

Python bindings for the apriltags3 library
https://pupil-apriltags.readthedocs.io/en/latest/index.html
Other
106 stars 29 forks source link

Update bindings.py to correct DLL search problem in Python 3.8 and above #48

Closed MichaelCurrie closed 2 years ago

MichaelCurrie commented 2 years ago

Fixes the DLL search issue introduced in Python 3.8, as per https://stackoverflow.com/a/64472088/1832942.

Without this fix, running a simple detection such as detector = apriltag.Detector(families='tagStandard41h12') in Python 3.8 or above will produce the following error:

FileNotFoundError: Could not find module 'C:\Python39\lib\site-packages\pupil_apriltags\lib\apriltag.dll' (or one of its dependencies). Try using the full path with constructor syntax.
celliott-a2e commented 2 years ago

ran into this issue using python 3.9. Manually applied the one-liner in this PR, works like a charm. Merge this!

papr commented 2 years ago

Fixed via #49

truher commented 2 years ago

i get a similar error using "main" on windows 11 using python 3.10.7.

FileNotFoundError: Could not find module 'C:\Users\joelt\AppData\Local\Programs\Python\Ptyon310\lib\site-packages\pupil_apriltags\lib\apriltag.dll'

is this a different problem?

papr commented 2 years ago

Please give the branch in https://github.com/pupil-labs/apriltags/pull/50 a try

truher commented 2 years ago

thanks! that didn't seem to work either. i'm giving up on windows, thanks anyway.

zalo commented 1 year ago

Just needed to apply this one 1-liner fix to my local Python 3.10 with a fresh 1.0.4 install from pip...

papr commented 1 year ago

@zalo what's the exact one-liner that you used?

zalo commented 1 year ago

The , winmode=0 additional arg in the PR

MichaelCurrie commented 1 year ago

Why didn't this get merged? Pls merge if possible thanks