Menu

Using the Python.NET interpreter on a MacOS?

Sam T.
2020-06-26
2020-07-06
  • Sam T.

    Sam T. - 2020-06-26

    I'm attempting to use the Python.NET scripting functionality on a Mac so I can import additional python packages (as done in the "Integrating a Chemical Process Simulator with TensorFlow" article), but I can't seem to figure out where to point the python path from the UI to be able to successfully use my native python and import the additional packages. I read through a few other more windows-specific(?) comments saying to point to wherever the python36.dll lives, but where does that translate to for a MacOS installed python? I tried pointing it to the directory I have python3.6 installed in (with the extra packages) but I still was getting import errors. Am I missing something necessary to use the Python.NET interpreter on a Mac? Thanks in advance!

     
  • Daniel Medeiros

    Daniel Medeiros - 2020-06-26

    Theorethically you wouldn't need to point to any directory as DWSIM should be able to detect python on macOS automatically, but things are a little more complicated than that. Sometimes it works sometimes it doesn't. What is your macOS version?

     
  • Sam T.

    Sam T. - 2020-06-26

    Thanks for the quick reply - MacOS Mojave 10.14.6

     
  • Sam T.

    Sam T. - 2020-06-26

    Another note - it seems when I switch the interpreter dropdown to python.NET, the interpreter remains as IronPython? Is this a bug, am I interpreting this wrong, or is there something else I should be doing? See attached screenshot.

    Thanks again for any help/advice you have!

     
    • Daniel Medeiros

      Daniel Medeiros - 2020-06-26

      I'll take a look at it.

       
      👍
      1
  • Daniel Medeiros

    Daniel Medeiros - 2020-07-06

    Hi Sam, this bug was fixed in v6.0 Update 5. Python.NET functionality is also working on macOS provided that you have a valid python 3.7 installation.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.