PythonNet FileNotFoundException:无法找到程序集
我正在尝试执行一个使用Python For
.Net(https://github.com/pythonnet/pythonnet)的Python脚本来加载名为“
Kratos_3.dll”的C#库,该库与脚本位于同一文件夹中,但文件找不到。
我已经使用“ pip install pythonnet”安装了clr。
这是我的脚本:
import clr
import sys
sys.path.insert(0,"C:\\dev\\proj_1\\")
clr.AddReference("Kratos_3")
我不断收到错误
FileNotFoundException: Unable to find assembly 'Kratos_3. at Python.Runtime.CLRModule.AddReference(String name)
当我使用IronPython运行它时,它可以工作,但是我想使用常规Python 2.7使它运行,我该怎么办?