Open kyflores opened 2 years ago
how did you remove the check?
how did you remove the check?
I had this ugly hack in my jupyter notebook, YMMV.
In short it locates bindings.py
in your interpreter's package path and then edits that line.
!pip install pupil-apriltags==1.0.4.post8
import pupil_apriltags as atgs
import os
if os.name == 'nt':
!pip install pupil-pthreads-win
init_path = atgs.__file__
at_dir = os.path.dirname(init_path)
target = at_dir + '\\bindings.py'
lines = None
with open(target, 'r', encoding='utf-8') as file:
lines = file.readlines()
lines[314] = " if platform.system() == \"Windows\":\n"
with open(target, 'w', encoding='utf-8') as file:
file.writelines(lines)
from importlib import reload
reload(atgs)
else:
print("Not on windows. Skipping patch.")
I ended up doing a fresh install for the package and adding this line before the detector os.add_dll_directory("C:/Users/mff5/anaconda3/Lib/site-packages/pupil_apriltags.libs")
It worked but but thank you for replying so fast!!
Hi,
I'm on Windows 11 10.0.22621 with
Python 3.9.13
and usingpupil-apriltags 1.0.4.post8
, installed with pip in an anaconda environment.When instantiating the detector, I get:
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.
On my system, the problem seems to be with the pthreadVC2.dll:
I installed the
pupil-pthreads-win
package first, and that didn't solve the problem. I then removed the check for < v3.8 at L315.After this change the library works. I have no experience w/ how this process is supposed to work on Windows, but maybe this will help identify a problem?