OSError:[WinError 126]找不到指定的模块。。。(Python 3.7和Visual Studio 2017)

2024-10-02 10:23:48 发布

您现在位置:Python中文网/ 问答频道 /正文

当我尝试在Visual Studio 2017中运行我的代码时,出现以下错误

Traceback (most recent call last):
  File "C:\Users\dsl0017\Desktop\ANOPP2 extraction\hartIITestPy\HartTwoUsingCfd.python.py", line 13, in <module>
    from ANOPP2_api import *
  File "C:\Users\dsl0017\Desktop\ANOPP2 extraction\hartIITestPy\ANOPP2_api.py", line 11, in <module>
    ANOPP2 = CDLL('libANOPP2.dll', RTLD_GLOBAL)
  File "C:\Users\dsl0017\Anaconda3\envs\py37\lib\ctypes\__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
Press any key to continue...

导致错误的相关代码为:

#!/usr/bin/env python
import numpy as np
import sys
import os
from ctypes import*

from ANOPP2_api import *

请帮忙。。。这件事我已经坚持了一个星期了。这是我研究的主要障碍


Tags: 代码infrompyimportapi错误line

热门问题