-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ImportError: DLL load failed with Windows wheel for 1.0.2 and 1.0.3 #32857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Things work for you with pandas 1.0.1 and earlier? |
Yes, things were fine with pandas 1.0.1 or any of the 0.* versions |
Thanks. We switched our wheel building infrastructure for 1.0.3, but if it's happening on 1.0.2 as well that's likely not it. I'm not aware of anyone else using pandas inside a windows docker container. You might be on your own here, so anything you can do to debug this would be welcome. |
Can you create a new environment and post the full output of this?
For both pandas 1.0.2 and 1.0.3 potentially. |
So, I too faced the exact error. I tried it on Jupyter notebooks and it worked though I could still not import some other pandas submodules. |
From @mborus: TLDR; 2 DLLs are missing that were included in 1.0.1 Code Sample, a copy-pastable example if possibleimport pandas as pd Problem descriptionI'm using Windows 7, German 64bit with a fresh installation of Python 3.8.2 64bit. I installed Pandas 1.0.3 from a via "python -m pip download pandas" download made on an unrestricted similar Windows7 machine. I moved the download folder behind a firewall and installed Pandas like this: "python -m pip install pandas --no-index --find-links /path/to/downloads": Pandas installs fine. It crashes on import with the error below (The last sentence says in English: The requested Module was not found) As recommended by this stack overflow thread (https://stackoverflow.com/questions/60763529/unable-to-import-pandas-pandas-libs-window-aggregations) going back to 1.0.1 fixes the problem. (More below, after the error) Error: (venv) C:\my_program>python
I compared the installation of version 1.0.1 to 1.0.3; The 1.0.3 installs these files in
The 1.0.1 version also installs these two DLLs in the same folder.
When I manually place these DLLs into the above folder of the 1.0.3 version, Expected OutputNo error message Output of
|
To everyone in this issue, does the problem occur using wheels from pandas 1.0.2 and 1.0.3? |
Can't say for 1.0.2, but I have installed the 1.0.3 wheel "pandas-1.0.3-cp38-cp38-win_amd64.whl" and extracted the DLLs from "pandas-1.0.1-cp38-cp38-win_amd64.whl" |
@mborus can you try for 1.0.2? Our wheel building infrastructure changed for 1.0.3, but we've had users report issues with 1.0.2 as well. |
I'll give it a try. This may take a while because the process of getting the Pandas wheel behind the firewall is a bit complicated. I'll post the result when I know more. |
Thanks! |
I installed the 1.0.2 (pandas-1.0.2-cp38-cp38-win_amd64.whl) briefly and it's the same problem. The two DLLs are not installed, so the import fails the same way. |
OK thanks for checking! @jbrockmendel or @WillAyd right now I'm guessing this is a wheel building issue, but do you know if we've had any changes to our build configuration between 1.0.1 and 1.0.2 that would cause this? #32857 (comment) is the clearest summary. |
Hmm https://github.com/pandas-dev/pandas/pull/32386/files touched |
I installed it using pip. I am using windows 10. Should I go to Panda's official website and download it? |
@TomAugspurger I am unable to use the pandas module though I can use it on Jupyter Notebooks without an error. How do I need to download any other version because I have used pip install. |
@AaryamanCodes this isn't something that would be affected by using it through the notebook or through the terminal. Most likely your notebook is using a different environment. It sounds like pandas 1.0.1 is not affected, so you can pin to that version for now. |
cc @cgohlke if you have any guesses. (see #32857 (comment)). Though the fact that it's failing with your wheels and the one we built on azure pipelines indicates that it's a problem with our configuration. |
I think the C++ runtime DLLs need to be packaged in the Line 760 in f20331d
|
Thanks. Is it strange that this is only coming up for 1.0.2 and newer, since there weren't any changes to the setup.py on the 1.0.x branch after 1.0: https://github.com/pandas-dev/pandas/commits/1.0.x/setup.py Can people running into this confirm that it only occurs with Python 3.8 (not Python 3.7)? 3.8 changed how DLL loading works IIRC. I've seen two people report using 3.8.2. Does anyone see it with 3.8.1? |
I am facing the same error for 1.0.3 and 1.0.2 using python 3.6.2. |
OK thanks. So it probably isn't related to Python 3.8's changes to DLL loading then. Is there a windows equivalent of
Can people check the windows equivalent for Any if anyone is able to compile pandas from source, @cgohlke's suggestion #32857 (comment) might provide a fix, even if we don't understand the cause. |
One more thing about this: I looked close at the other Windows7 machine, where version 1.0.3 worked fine. On this machine I found the missing DLLs msvcp140.dll and concrt140.dll on the system path in c:\windows\system32 and dozens of other places. (like inside matplotlib, PySide2, numpy, dropbox and such). My guess is that it's working for most Windows users if Pandas is missing the DLLs because they are found somewhere else. Only some pretty empty installations (like a Docker container or the firewall protected machine I had problems with) will not have those DLLs on the path. I tried my Python 3.7.4 64bit installation, updated Pandas to 1.0.3 and the "c:\Python37\Lib\site-packages\pandas_libs\window" directory is also missing the DLLs. But |
Is this reproducible outside of Docker? AFAICT msvcp140.dll isn't necessarily a system file but at the same time is required to run C++ applications. There's a similar thread on MSFT forums about it missing: So maybe the Docker container should just require that instead of changing anything with pandas? |
Hmm, kind of stuck here. Built a wheel with the DLLs packed, see below, but still get that import error. But, if I install the 1.0 wheel, with the same DLLs packed (was that built by you @cgohlke ?), works fine.
|
1.0.0 - 1.0.2 are from Christoph. 1.0.3 is the first to be built on azure-pipelines. |
In case you are using VS 2019, |
Wow, that's it - thanks! |
I ran into this issue today on a Windows 2012 server after updating to Python 3.8 and installing pandas 1.0.3. I found concrt140.dll and msvcp140.dll in C:\Windows\System32 and copied them to the \pandas_libs\window folder as specified here to resolve. |
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. |
We ran into the same issue on our production VM (Windows Server 2016 Data Center). Pandas 1.0.1 works fine, but anything later throws a "Could not load DLL" error. We use Python 3.7.6. |
This is fixed in master. I think MacPython/pandas-wheels#82 is the only remaining change needed for our build infrastructure. I'm not sure that anyone has time to make a release in the near-term, but these wheels are uploaded to https://anaconda.org/scipy-wheels-nightly/pandas nightly. |
i'm getting for pandas, python 3.7.4 with pandas 1.0.5
may I know the fix? |
@apremgeorge as far as I know this was fixed in 1.0.4, and it shouldb e fixed in 1.0.5 as well. Can you post the outputs of
and repeat that for 1.0.5? |
@TomAugspurger Thanks for the reply |
pandas 1.0.1 worked for me |
@apremgeorge Try out my suggestion above. It has worked for me on several fresh windows/python installs lately where I was seeing the same issue. #32857 (comment) |
The VC++ runtime DLLs did not make it into the wheels on PyPI. It looks like the DLLs are copied to the pandas source directory after (not before) building the wheels. https://github.com/MacPython/pandas-wheels/blob/master/azure/windows.yml#L71-L74 |
Thanks for the pointer. Will see if MacPython/pandas-wheels#90 fixes it. |
Could people here try out the 1.1.0rc0 wheel to see if the problem is fixed? |
Hi, try reinstalling python and do |
Has anyone here been able to try the pre-release wheels for 1.1.0rc0? We're planning to release 1.1.0 final today or tomorrow and it would be nice to verify that this is fixed. |
Tried |
Tried this with Python3.8 64bit & Python3.8 32bit (the 32bit never had pandas installed) and it worked for me. |
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 🥳 |
Thanks for confirming. 1.1.0 will be out later today. |
When trying to install
pandas 1.0.2
or newer versions on a docker, I run into the following import error:I've reproduced this error on a separate pc by running:
This error only occurs when trying to import pandas from the docker. Python and pip versions:
The text was updated successfully, but these errors were encountered: