-
Notifications
You must be signed in to change notification settings - Fork 751
Issues using coreclr on Linux without Mono #801
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
Comments
does npython.exe work for you? you can build it from the full solution in pythonnet repository. |
I confirm I can run Looks like this route would work for a set of our use cases. I understand your comments in #96 better now and conclude that the other embedding route (not calling Python from a .NET app) does not work yet. Our other set of use cases would call C# DLLs within Jupyter notebooks - not sure nPython could be used there as an alternative Python kernel, could it? |
@denfromufa to be sure, nPython.exe does not work:
but I wouldn't expect it to as it targets .NET 4.0 (presumably it would work after installing Mono and the required runtime). The netcoreapp2.0 target framework produces nPython.dll, which does work. |
@rlordcardano yes, I should have been more specific - most likely |
My two cents:
This is not always the location of the .NET Core runtime, e.g. on my system it's 2.1.5. There must be a way to find out programmatically what version of the runtime is installed. E.g.
|
On CentOS 7 the locations are not very consistent:
I'm not sure probing for the location will be very successful. static const char* coreRootVar = "CORE_ROOT";
const char* clrFilesPath = getenv(coreRootVar);
if (clrFilesPath == NULL) {
clrFilesPath = "/usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0";
}
if (!GetClrFilesAbsolutePath(pn_args->entry_path, clrFilesPath, &pn_args->clr_path))
{
pn_args->error = "Unable to find clr path";
return;
} I chose CORE_ROOT because it's already used by corerun.exe. This could be set in python or in the shell. |
I'm looking into a pure Python solution using ctypes right now, there I'm parsing the output of the |
Closed in favour of #984. |
Uh oh!
There was an error while loading. Please reload this page.
Environment
Details
I was trying to test PR #612 for our use case (calling functionality implemented in .NET Standard 2.0 DLLs from Python 3.x). We currently manage to do this on Linux by using Mono and Pythonnet, but we are trying to avoid the dependency on Mono going forward.
Here I have included the dockerfile used to setup the required environment (Ubuntu 18.04 docker image, with .NET Core SDK, Python 3.6.7 and a clone of PR #612) so that one can reproduce what I'm seeing.
Subsequently, after starting the docker image, run:
Subsequently, install the wheel that has been generated in the dist folder.
The error I get after this is:
The text was updated successfully, but these errors were encountered: