Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: DLL load failed while importing aggregations: The specified module could not be found

I am new to Python and currently having trouble when importing some libraries.

I am using Python 3.8.

I have installed Pandas in the CMD using "pip install pandas"

If i go to Python folder i see that Pandas is installed:

C:\Users\VALENTINA\AppData\Local\Programs\Python\Python38-32\Lib\site-packages

But then i get this error message when trying to import Pandas in my script:

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    import pandas as pd
  File "C:\Users\VALENTINA\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pandas\__init__.py", line 55, in <module>
    from pandas.core.api import (
  File "C:\Users\VALENTINA\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pandas\core\api.py", line 29, in <module>
    from pandas.core.groupby import Grouper, NamedAgg
  File "C:\Users\VALENTINA\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pandas\core\groupby\__init__.py", line 1, in <module>
    from pandas.core.groupby.generic import DataFrameGroupBy, NamedAgg, SeriesGroupBy
  File "C:\Users\VALENTINA\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pandas\core\groupby\generic.py", line 60, in <module>
    from pandas.core.frame import DataFrame
  File "C:\Users\VALENTINA\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pandas\core\frame.py", line 124, in <module>
    from pandas.core.series import Series
  File "C:\Users\VALENTINA\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pandas\core\series.py", line 4572, in <module>
    Series._add_series_or_dataframe_operations()
  File "C:\Users\VALENTINA\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pandas\core\generic.py", line 10349, in _add_series_or_dataframe_operations
    from pandas.core.window import EWM, Expanding, Rolling, Window
  File "C:\Users\VALENTINA\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pandas\core\window\__init__.py", line 1, in <module>
    from pandas.core.window.ewm import EWM  # noqa:F401
  File "C:\Users\VALENTINA\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pandas\core\window\ewm.py", line 5, in <module>
    import pandas._libs.window.aggregations as window_aggregations
ImportError: DLL load failed while importing aggregations: The specified module could not be found.

I have this error message when running my script in Visual Code and also in IDLE.

I appreciate if someone can help me

Thnks

like image 914
Valentina Caffera Avatar asked Mar 20 '20 00:03

Valentina Caffera


People also ask

How to fix importerror DLL load failed error?

importerror: dll load failed: The specified module could not be found error occurs because of the incompatibilities of Microsoft Visual C++ (Visual studio) versions. The best way to fix this error (importerror: dll load failed) is to reinstall/ install the Microsoft Visual C++ distribution.

What are the import errors for TensorFlow-GPU?

Tensorflow-GPU Installation ImportError: DLL load failed: The specified module could not be found 1 ImportError: DLL load failed: The specified module could not be found. when trying to "from PIL import Image"

What is module not found error in Python?

The Python interpreter itself can run on almost all operating systems. Many users may use it on a Windows computer. But some users report that they have encountered module not found error Python. The error usually gives you the following message: ImportError: Dll Load Failed: The specified module could not be found.

How do I fix import error import error failed in Python?

Error ImportError: DLL load failed: Reasons & Fixes : Sometimes it happens if there are multiple versions of Python installed. Uninstall the not reuqired version or use Python Virtual Environment (virtualenv) to separate Multiple Python versions. Try reinstalling Python – You can try native Python or Anaconda Python.


1 Answers

You may also try to install a fresher version of Microsoft Visual C++ Redistributable.

E.g. (2015-2019)

I had the same problem, and installing the aforementioned resolved it.

https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads

like image 124
watupzack Avatar answered Sep 28 '22 18:09

watupzack