- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我建了一个.pyd
在 Visual Studio 2019(社区)中,它为仅存在于 LibRaw 中的某些功能提供了包装器。该解决方案编译成功,没有任何警告或错误。该项目使用 LibRaw、OpenCV 和 pybind11 以及 Python.h
和相应的.lib
-文件。
当我尝试导入 .pyd
在 Python 解释器中,我得到:
C:\Users\Tim.Hilt\source\repos\cr3_converter\Release>dir
Datenträger in Laufwerk C: ist Acer
Volumeseriennummer: EC36-E45E
Verzeichnis von C:\Users\Tim.Hilt\source\repos\cr3_converter\Release
22.01.2020 11:28 <DIR> .
22.01.2020 11:28 <DIR> ..
22.01.2020 11:28 808 cr3_converter.exp
22.01.2020 11:28 3.068.361 cr3_converter.iobj
22.01.2020 11:28 785.552 cr3_converter.ipdb
22.01.2020 11:28 1.908 cr3_converter.lib
22.01.2020 11:28 4.190.208 cr3_converter.pdb
22.01.2020 11:28 953.856 cr3_converter.pyd
31.10.2019 16:22 26.408.085 IMG_0482_raw.CR3
7 Datei(en), 35.408.778 Bytes
2 Verzeichnis(se), 77.160.587.264 Bytes frei
C:\Users\Tim.Hilt\source\repos\cr3_converter\Release>python
Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 22:39:24) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cr3_converter
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed while importing cr3_converter: The specified module was not found.
>>> import cr3_converter.pyd
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed while importing cr3_converter: The specified module was not found.
>>>
.dlls
的路径(在这种情况下是 Python 和 OpenCV;LibRaw 是完全静态链接的)在系统路径中设置。
API-MS-WIN-CORE-....dlls
)并得到了一个错误,如下所示:
.dll
上时,我可以看到
api-ms-win... module could not be found on disk
.我已经搜索并找到了该模块并将其目录路径添加到系统路径中。现在该模块不再以红色突出显示,而是
C:\WINDOWS\SysWOW64\WS2_32.dll
(屏幕截图顶部的红色突出显示)仍然显示缺少导入。这可能是一个问题吗?
.pyd
:
.dll
-配置和.pyd
-文件扩展名.pyd
在 python 解释器中 .dlls
由库加载,但在我的情况下,Dependency Walker 引用的库与我的路径变量中的库相同。
最佳答案
我悄悄假设,Windows 搜索 .dll
s 在与系统 (/users) 中列出的目录相同的目录中 PATH
-多变的。
然而,事实并非如此,因为 ProcMon透露。现在,我复制了丢失的 .dll
s 到包含 .pyd
的文件夹一切正常。
关于python - Pybind11 : "ImportError: DLL not found" when trying to import *. Python解释器中的pyd,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59860465/
首先,感谢大家努力解决我的这个疑问。我正在转换一个最小的 C++ 项目以在 Python 中使用。这种努力背后的真正原因是为了速度。 我遇到了 PyBind,对它的功能以及他们提供的文档数量感到非常惊
我有以下类结构(我实际实现的简化示例): /* TestClass.hpp */ #pragma once template class CurRecTemplate { protected:
我有以下设置(1 个基类、1 个派生类、1 个容器)。容器采用 shared_ptr作为输入。 #include namespace py = pybind11; struct Base { };
我刚刚安装了 pybinding,我正在尝试运行该库文档中提出的第一个示例。 import pybinding as pb import numpy as np import matplotlib.p
我正在使用 pybind 包装一些 C++ 函数,然后在 Python 中使用它。我需要一些结构,但我不知道如何在 Python 中访问它的属性。我的结构没有只有方法的属性,所以我认为绑定(bind)
我使用以下命令创建了一个 miniconda 环境: conda create -n build_a_python_cpp_module xtensor-python -c conda-forge 激
为了更好地理解如何使用 pybind 库将参数从 Python 传递到 C++ 函数,我想构建一个小的虚拟/演示代码,我可以在其中接收 C++ 端的 Python 列表,将其转换为浮点指针对象,然后打
我正在尝试编译 Pybind11 C++ 中的模块它调用了几个头文件(.h)在上面。由于我有很多头文件,我决定做一个 Makefile ,没有问题,除了创建目标共享对象文件(s.o) .我需要这个共享
pybind 的新手 - 阅读文档,但我不了解如何将其应用于二维数组。 我有两个数组存储 3d 坐标 shape = (10,3) a = np.zeros(shape=(10,3)) b = np.
TL;博士 将 pybind11 绑定(bind)添加到工作中的 C++ DLL 项目允许我在 Python 中导入和使用生成的 DLL,但会破坏我使用 boost/dll 机制在 C++ 代码中使用
在 Pybind 中,可以通知 Python 关于函数的参数名称: m.def("add", &add, "A function which adds two numbers", py::arg(
当我运行 pip install .在我有 setup.py 的目录中。我正在使用 pybind11 为我的 C++ 项目构建一个 python 模块。 (同样,在 Windows 10 上) 我收到
我正在尝试使用 PyBind 在 C++ 中嵌入一些 Python 代码。大多数文档都是关于使用 C++ 扩展 Python,但我对嵌入感兴趣: 关于 http://pybind11.readthed
我正在尝试使用 pybind11 实现 C++ 到 python,并使用 pybind11-multiprocessing-hangs 。不同之处在于我想在c++中使用python对象并继续从c++调
我是一名优秀的程序员,十分优秀!