Skip to main content
Question

Python Exception: No module named 'pandas._libs.interval'


manuel_h
Contributor
Forum|alt.badge.img+1

Hello everyone

I have installed the module xarray with pip but I always get the error message :

Screenshot error message

Python Exception <ModuleNotFoundError>: No module named 'pandas._libs.interval'
Error executing string `import fme
import fmeobjects
import xarray

 

In the old FME desktop version 2021.1.3.1 the module worked perfectly. In the new version FME Form 2023.2.2 it no longer finds the intervall submodule from Pandas, although it is present in the installation path. The Python interpreter is set to 3.8+
Can anyone help me with this?

2 replies

david_r
Celebrity
  • March 18, 2024

I’m guessing it’s a problem with version dependencies and the Python module search path.

From the command line, try executing fme.exe python and then:

import pandas as pd
print(pd.__version__)

You want to make sure that the Pandas version is the one you’re expecting. You should also check the Python search path to verify that you’re not having different versions of the same module in different locations (a typical example is numpy, which is included in the FME installation, but might not be the version required by your Pandas installation):

import sys
for p in sys.path:
    print(p)

 


manuel_h
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • April 8, 2024

Thank you very much for your help. In this case it was apparently a different problem: Our system architecture is somewhat special and a colleague who is more familiar with it realized that it was due to the coding. Internally, we do not use UTF-8 as the standard. The problem could then be solved with the following lines:

import locale
locale.setlocale(locale.LC_ALL, '')

Not the prettiest solution, but at least the problem could be avoided for the time being.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings