No module named pandas

sombodyfromtheworld Member Posts: 26
First Comment Name Dropper
edited December 2023 in Structures

How to get pandas be recognized?

I'm running this script in Mechanical Scripting Console:

import sys
import pandas as pd
# output: No module named pandas


  • Mike.Thompson
    Mike.Thompson Member, Employee Posts: 240
    First Anniversary First Comment 5 Likes Ansys Employee

    The mech scripting console is running the default API that is IronPython. Pandas is not compatible with IronPython, thus you would need to turn on the beta (as of 23.2) feature for CPython and toggle the interpreter to run in that mode.
    See other general posts about running CPython and/or numpy, scipy etc….