General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

Importing external Python libraries into ANSYS ACT

    • adrianio
      Subscriber

      Hi,


      I am currently writing an ACT extension that exports the mass and stiffness matrix from Mechanical, using APDL code run in the background. I will then need to perform some matrix operations on these matrices using the Python library NumPy. However, it looks like ACT does not support external Python libraries, as I get the error message "No module named numpy" when the import numpy command is run. 


      Is it possible to somehow set the path to my local installation of NumPy so that ACT recognizes the module and imports it corectly? I have used other Python modules, like "datetime" and "subprcess" without any import errors, so I figure NumPy would be possible to use as well. 


       


      Thanks for any help. It is highly appreciated.


      Adrian

    • pinkerthoms
      Subscriber

      Hi,


      Did you find a solution to import these libraries ?

    • Mark Capellaro
      Ansys Employee

      The python used in ACT is IronPython. That means that only libraries that function with python pre 3.0(?) will work. So numpy will not work directly with ACT. If you check the documentation for individual packages, you will see what python versions it is written for. 

Viewing 2 reply threads
  • The topic ‘Importing external Python libraries into ANSYS ACT’ is closed to new replies.