This is the code I copy, and I want to learn to use Python.Runtime, but when it runs, it throws an exception.
"DLL" python2.7m "cannot be loaded: no specified module can be found. (the exception comes from HRESULT:0X8007007E). "
As a problem with a rookie. Thank you.
using Python.Runtime;
using System;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)
{
using (Py.GIL())
{
dynamic np = Py.Import("numpy");
dynamic sin = np.sin;
Console.WriteLine(np.cos(np.pi * 2));
Console.WriteLine(sin(5));
double c = np.cos(5) + sin(5);
Console.WriteLine(c);
Console.ReadKey();
}
}
}
}
User contributions licensed under CC BY-SA 3.0