Jump to content
Sign in to follow this  
carlosanduj

Error import pandas

Recommended Posts

Hello everyone

I'm starting to develop an application with Python4delphi and have run into a problem.
The Python4delphi demos work correctly and I can communicate with python.

The problem appears when I go to run
import pandas as pd

 

When I do this it shows me this error:

 

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Carlos\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\__init__.py", line 59, in <module>
    from pandas.core.api import (
  File "C:\Users\Carlos\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\api.py", line 47, in <module>
    from pandas.core.groupby import (
  File "C:\Users\Carlos\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\groupby\__init__.py", line 1, in <module>
    from pandas.core.groupby.generic import (
  File "C:\Users\Carlos\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\groupby\generic.py", line 67, in <module>
    from pandas.core.frame import DataFrame
  File "C:\Users\Carlos\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\frame.py", line 142, in <module>
    from pandas.core.generic import (
  File "C:\Users\Carlos\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\generic.py", line 187, in <module>
    from pandas.core.window import (
  File "C:\Users\Carlos\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\window\__init__.py", line 1, in <module>
    from pandas.core.window.ewm import (
  File "C:\Users\Carlos\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\window\ewm.py", line 11, in <module>
    import pandas._libs.window.aggregations as window_aggregations
ImportError: DLL load failed while importing aggregations: No se puede encontrar el módulo especificado.

 

I have no problems with other imports like sys, os or matplotlib.

The curious thing is that import pandas works correctly from the python console.

I have uninstalled pandas and reinstalled it even downgrading the version and I can't solve it.

On a colleague's PC with the same installation that I have, everything works perfectly.

Does it occur to you what could be happening?

 

Thank you very much for your time

 

Carlos

Share this post


Link to post

I finally got it to work.
I had to install the latest version of Visual C++ redistributable and the problem was solved.

 

Kind regards

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×