Question

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

  • 18 March 2024
  • 2 replies
  • 81 views

Badge +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

Userlevel 4

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)

 

Badge +1

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