No module named pandas

sombodyfromtheworld
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
sys.path.append(r'C:\\...\\Lib\\site-packages\\pandas')
import pandas as pd
# output: No module named pandas

Answers

  • 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….