.NET
Microsoft Technologies based on the .NET software framework.
4,041 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The program can run on my computer, and the packaged program needs to add a Python package under the. exe path to run.
When I run the packaged. exe on another computer, I can't succeed in any way.
I have changed to a relative path and read python38.dll. I don't know why it failed.
public Form1()
{
try
{
// Runtime.PythonDLL = Path.Combine(Environment.GetFolderPath( //Environment.SpecialFolder.LocalApplicationData),
//str + @"\Python\python38.dll");
Runtime.PythonDLL = Environment.CurrentDirectory + @"\Python\python38.dll"; InitializeComponent();
PythonEngine.Initialize();
PythonEngine.BeginAllowThreads();
}catch(Exception e)
{
throw;
}
}