-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python.Runtime.BadPythonDllException #54
Comments
did you compile this for x86 ? |
using System;
using System.Threading.Tasks;
using Python.Included;
using Python.Runtime;
namespace NetCoreExample
{
class Program
{
static async Task Main(string[] args)
{
await Installer.SetupPython();
PythonEngine.Initialize();
dynamic sys=PythonEngine.ImportModule("sys");
Console.WriteLine("Python version: " + sys.version);
}
}
}
dynamic sys=PythonEngine.ImportModule("sys"); The last line should be changed to: dynamic sys=Py.Import("sys") |
and that solves it? |
There is no error when the program automatically downloads python, and if you want to set the python version by yourself, it is still not solved |
I guess the newer version of pythonnet doesn't work with old python versions any more? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
using System;
using System.IO;
using System.Threading.Tasks;
using Python.Runtime;
namespace Python.Deployment.Download
{
class Program
{
static async Task Main(string[] args)
{
// ================================================
// This example demonstrates how to download a Python distribution (v2.7.9) and install it locally
// ================================================
}
PythonEngine.Initialize();
error!!!
Python.Runtime.BadPythonDllException:“Runtime.PythonDLL was not set or does not point to a supported Python runtime DLL. See https://github.com/pythonnet/pythonnet#embedding-python-in-net”
The text was updated successfully, but these errors were encountered: