[英]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).我正在使用 cubemos 骨架跟踪 Api(用于从图片和视频中提取骨架关键点)。 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
第 3 行是我导入库时: 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.另一个奇怪的事情是,问题是在我没有做任何事情的情况下随机修复的,然后它又回来了,我尝试重新安装 cubemos SDK,重新启动计算机,调试。 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.我真的不知道这个问题的根源是什么,这似乎是我的操作系统的一些问题(我有 windows 10. 并使用 python 3,7 和 VENV 和 Z354E8DAD2DCC402139E3115Z8路径是问题,但同样,它以前工作过。 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.我在使用 conda env 时遇到了同样的问题。 Demos worked but not the python sample.演示有效,但 python 示例无效。 I explicitly added %CUBEMOS_SKEL_SDK%\bin
to my Path environment since I had nothing before.我明确地将%CUBEMOS_SKEL_SDK%\bin
添加到我的 Path 环境中,因为我之前什么都没有。 That got it going.就这样搞定了。 The %CUBEMOS_SKEL_SDK%
was set up okay from the start. %CUBEMOS_SKEL_SDK%
从一开始就设置好了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.