简体   繁体   中英

OSError: [WinError 126] when importing a library in python

i am using the cubemos skeleton tracking Api (using for extract skeleton keypoints from pictures and videos). i have a very weird problem: everything was working fine, until one day, i received this error (also added image):

Traceback (most recent call last):
  File "C:/Users/omria/PycharmProjects/skeletonTracking/skeletonTracking.py", line 3, in <module>
    from cubemos.skeleton_tracking.nativewrapper import Api, SkeletonKeypoints
  File "C:\Users\omria\PycharmProjects\skeletonTracking\venv\lib\site-packages\cubemos\skeleton_tracking\__init__.py", line 1, in <module>
    from .nativewrapper import *
  File "C:\Users\omria\PycharmProjects\skeletonTracking\venv\lib\site-packages\cubemos\skeleton_tracking\nativewrapper.py", line 28, in <module>
    os.path.join(cubemos_dir, "bin", "cubemos_skeleton_tracking.dll")
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\ctypes\__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found

enter image description here

and line 3 is when i'm importing the library: from cubemos.skeleton_tracking.nativewrapper import Api

another weird thing, is that the problem was fixed randomly without me doing anything, and then it returned again, i tried reinstalling the cubemos SDK, rebooting the computer, debug. and i really don't know what is the source of this problem, it seems like its some problem with my OS (i have windows 10. and using python 3,7 and VENV and PIP for the project) i tried to figure out if the path is the problem, but again, it was working before. and i can't really tell if that is the problem? what do you think is causing this. i will appreciate any help. thanks !

I had the same problem using a conda env. Demos worked but not the python sample. I explicitly added %CUBEMOS_SKEL_SDK%\bin to my Path environment since I had nothing before. That got it going. The %CUBEMOS_SKEL_SDK% was set up okay from the start.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM