Skip to content

.NET 5 and Ubuntu compatibility #23

@Dave3991

Description

@Dave3991

Enviroment: Ubuntu 20.04

Error:

   at Python.Runtime.Runtime.Py_IsInitialized()
   at Python.Runtime.Runtime.Initialize(Boolean initSigs)
   at Python.Runtime.PythonEngine.Initialize(IEnumerable`1 args, Boolean setSysArgv, Boolean initSigs)
   at Python.Runtime.PythonEngine.Initialize(Boolean setSysArgv, Boolean initSigs)
   at Python.Runtime.PythonEngine.Initialize()
   at PythonExecutor.Program.Main(String[] args) in /home/david/Documents/personal/gitlab/inventory-management/InventoryManagement/app/PythonExecutor/Program.cs:line 13

Process finished with exit code 134.

Steps to reproduce:
run this code:

using System;
using Python.Runtime;

namespace PythonExecutor
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            Environment.SetEnvironmentVariable("LD_DEBUG","true");
            PythonEngine.Initialize();
            dynamic sys=PythonEngine.ImportModule("sys");
            Console.WriteLine("Python version: " + sys.version);
        }
    }
}

I think it's because it's not multiplatform ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions