Is there a way to run a script using GrantaSTK on MacOS?

VEtique
VEtique Member, Employee Posts: 8
Name Dropper First Anniversary First Comment Ansys Employee
edited December 2023 in Materials

Would there be a way? Through an executable? A virtual env? A docker container?

Tagged:

Best Answer

  • Andy_Grigg
    Andy_Grigg Member, Employee Posts: 15
    First Answer First Comment First Anniversary 5 Likes
    edited December 2023 Answer ✓

    The Scripting Toolkit supports Windows and certain distributions of Linux only, as of the 2023 R2 release Ubuntu 20.04, SLES 15.3, Debian 9.11, and RHEL/CentOS 7.9. Conda is also supported, but only for Linux.

    A 'compiled Python executable' is really just a self-extracting zip with a bundled Python interpreter and requirements, it doesn't fundamentally change how Python is executed. A virtual environment is basically the same, except it's not zipped up. As a result, these solutions won't work, you're still trying to use Windows/Linux binaries with an incompatible MacOS C runtime, and you'll get the same runtime errors as with any other way of running scripts.

    A docker container would work though, since the Python would be executing in a Linux environment with a Linux C runtime. You would want to use a supported Linux platform, probably Ubuntu 20.04 (22.04 should also work). If it's not possible to use a supported Linux platform any Linux platforms supported by Conda should work with the conda packages.

    An alternative is a full virtual machine, but I think docker is a better option.

Answers

  • VEtique
    VEtique Member, Employee Posts: 8
    Name Dropper First Anniversary First Comment Ansys Employee

    Thanks Andy for the quick and super detailed answer!

This discussion has been closed.