Is it possible to get the .NET Link working on Raspberry Pi?

I understand that Linux and MacOS versions of Mathematica come with .NET Link running on Mono and now even possibly under new open-source .NET Core:

$\quad \quad$ Running .NET/Link on Mono (On MacOS or any UNIX or Linux Distro)

But not RPi:



... cannot find the package on RPi.

So to get .NET Link working on RPi, can I use approach similar to copying Python files from desktop version to RPi as described in the following link?

$\quad \quad$ How to get Python bindings to work on the Raspberry Pi

  • 1
    $\begingroup$ .NET/Link is not included in the Raspberry Pi version of Mathematica. $\endgroup$ – Szabolcs Mar 28 '15 at 13:23
  • 1
    $\begingroup$ The approach used to get Python bindings won't work here. You can copy the windows version of NETLink to the RPi ("can" doesn't necessarily mean "allowed to"); however, InstallNET.exe and the accompanying dll are for Windows, not the RPi, and would need to be recompiled. There is a 'source' directory included in the NETLink file structure, but I don't know enough about the platform to say whether or not you can recompile for the RPi. This is probably a good question for WC. $\endgroup$ – bobthechemist Mar 28 '15 at 16:46
  • 1
    $\begingroup$ @bobthechemist I don't know about about .NET, but I thought that the platform independent Mono/.NET executables also have an .exe extension. The Mac version of .NET/Link also comes with an InstallNET.exe. Perhaps this is not a Windows executable after all. $\endgroup$ – Szabolcs Mar 28 '15 at 20:51
  • 1
    $\begingroup$ @bobthechemist Well, it turns out copying it does work :) Note to the OP: I guess first thing to do is to just try. $\endgroup$ – Szabolcs Mar 28 '15 at 21:14

Okay, I tried this and it seems to work.

  1. I copied NETLink from a Mac to /opt/Wolfram/WolframEngine/10.0/SystemFiles/Link.

  2. I installed the full mono package: sudo apt-get install mono-complete

  3. Started wolfram, loaded <<NETLink`, then evaluated InstallNET[]. It seems to work.

I don't know much about .NET though so I can't test in detail.

  • $\begingroup$ Yup, got this far. I wasn't able to get any of the examples to work properly, however. $\endgroup$ – bobthechemist Mar 28 '15 at 23:10
  • 2
    $\begingroup$ @bobthechemist I'm not sure which examples are Windows specific ... many of them are GUI related. So I only tried LoadNETType["System.GC"]; GC`Collect[];, which seemed like something that should work across platforms. It worked fine. I think if something doesn't work, that's likely because the RPi version of Mono doesn't have it and not because of any limitations of .NET/Link. But I might be wrong, I don't use .NET. $\endgroup$ – Szabolcs Mar 29 '15 at 0:49
  • $\begingroup$ Good point, I tried the circumference one which didn't seem to work, but I also have insufficient knowledge of .NET to debug further. $\endgroup$ – bobthechemist Mar 29 '15 at 0:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.