Solved

No Module name pandas:

  • 29 January 2020
  • 2 replies
  • 66 views

Hi there,

 

I have installed the pandas library into my workstation using the following command:

fme.exe python -m pip install <package_name> --target <package_destination_folder>

and got following message:

Successfully installed numpy-1.18.1 pandas-0.25.3 python-dateutil-2.8.1 pytz-2019.3 six-1.14.0

 

However, when in python Caller I tried to import pandas using the following command:

import pandas

and ran the transformation, it throws an error message:

Python Exception <ModuleNotFoundError>: No module named 'pandas'

 

Could anyone help me in fixing the error?

 

icon

Best answer by david_r 29 January 2020, 09:38

View original

2 replies

Userlevel 4

FME may contain separate interpreters for e.g. Python 2.7 and 3.7. When installing pandas, did you install it into the same interpreter as the one used by your workspace?

My recommendation would be to not install pandas into FME, but to install a separate Python interpreter and point FME to it: https://knowledge.safe.com/articles/814/choosing-a-different-python-interpreter-installati.html

In most cases this error in Python generally raised:

 

  • You haven't installed Pandas explicitly with pip install pandas.
  • You may have different Python versions on your computer and Pandas is not installed for the particular version you're using.

 

You can run the following command in your Linux/MacOS/Windows terminal.

pip install pandas

To be sure you are not having multiple Python versions that are confusing, you should run following commands:

python3 -m pip install pandas
python3 -c 'import pandas'

 

 

 

 

Reply