pandas: ImportError: DLL load failed with Windows wheel for 1.0.2 and 1.0.3
When trying to install pandas 1.0.2
or newer versions on a docker, I run into the following import error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python\lib\site-packages\pandas\__init__.py", line 55, in <module>
from pandas.core.api import (
File "C:\Python\lib\site-packages\pandas\core\api.py", line 29, in <module>
from pandas.core.groupby import Grouper, NamedAgg
File "C:\Python\lib\site-packages\pandas\core\groupby\__init__.py", line 1, in <module>
from pandas.core.groupby.generic import DataFrameGroupBy, NamedAgg, SeriesGroupBy
File "C:\Python\lib\site-packages\pandas\core\groupby\generic.py", line 60, in <module>
from pandas.core.frame import DataFrame
File "C:\Python\lib\site-packages\pandas\core\frame.py", line 124, in <module>
from pandas.core.series import Series
File "C:\Python\lib\site-packages\pandas\core\series.py", line 4572, in <module>
Series._add_series_or_dataframe_operations()
File "C:\Python\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:\Python\lib\site-packages\pandas\core\window\__init__.py", line 1, in <module>
from pandas.core.window.ewm import EWM # noqa:F401
File "C:\Python\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’ve reproduced this error on a separate pc by running:
docker run -it python cmd.exe
pip install pandas
python
import pandas
This error only occurs when trying to import pandas from the docker. Python and pip versions:
python 3.8.2
pip 20.0.2
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 52 (30 by maintainers)
I just installed python3.8 on a completely fresh installation of Windows 10 1909 and ran into this issue. All I had to do was install the lastest x64 version of the visual c redistributable vc_redist from here and my import problem went away.
On a docker image with python 3.7.8 and Windows-10-10.0.17763-SP0, we can reproduce the DLL error with pandas==1.0.5, and in a fresh instance get no error with pandas==1.1.0.rc0 🥳