【发布时间】:2019-04-04 06:51:41
【问题描述】:
我正在使用 Visual Studio 在 C# 中创建一个应用程序,该应用程序将运行一些 Python 脚本并获取它们的返回值。为此,我想使用 Python.Net(或 Python for .Net)。我通过 anaconda 安装了 Python.Net。
但是如果我运行程序,我会收到找不到 python36.dll 的错误:
System.DllNotFoundException: Unable to load DLL 'python36':
The specified module could not be found
如果我想加载 anaconde 的 python36.dll 作为对我的项目的引用,我会得到:
Reference "C:\Programm Files (x86\Micrtosoft\Visual Studio\Shared\Anaconde3_64\python36.dll" can't be
added, Please make sure that the file is accessible and that it is
a valid assembly or COM component.
我尝试使用以下方式注册 dll:
regsvr32
也没有用。
【问题讨论】:
-
可以选择在机器上定期安装 python 吗?这样我就不用Anacondas python了?
标签: c# python visual-studio python.net