Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
384 views
in Technique[技术] by (71.8m points)

python - Cannot Load netCDF4 Due to Missing .dll File

I recently installed pymc3 via conda install on my Windows 10 machine, but it throws up an ImportError whenever I try to import it. The exact error message, linked specifically to the netCDF4 package, provided is:

File "C:Usersenamanaconda3libsite-packages
etCDF4\__init__.py", line 3, in <module>
from ._netCDF4 import * ImportError: DLL load failed while importing _netCDF4: The specified procedure could not be found.

I have found next to nothing online that pertains to this exact problem, with the exception of this thread: https://github.com/ContinuumIO/anaconda-issues/issues/1671

Here, two users discovered that this error was due to a missing debug dll file from the MSVC 2010 C++ runtime library; because this debug dll file is not present on all systems, this issue would arise from time to time.

Although I sincerely hope this is no longer the issue that contributes to this error (since this was a pretty major bug and the linked thread is nearly 3 years old), I tried downloading that specific debug dll (msvcr100d.dll) and placing it in the same location as the non-debug version on my system, with no success (the same error message persisted).

I have also tried another trick that apparently used to work from that same thread, where I removed pymc3 via conda, then reinstalled it using pip instead. This did not work, either. I tried the same for the netCDF4 module specifically, as well, since this is the one that's causing the problem, but that also did not work. When running pip list or conda list (depending on which method I used to install netCDF4 and/or pymc3), these modules appeared with their version numbers, so they seem to be installed properly. I've also tried a fresh install of anaconda, and even a fresh install of python by itself, where I installed all necessary packages via pip; neither of these actions worked, and I would always end up with the same error message.

At this point, I'm at a complete loss as to what I can do to resolve this issue. Is there any new information on this, or at least, newer than the ~3 year old thread I've linked?

Any help is greatly appreciated!

question from:https://stackoverflow.com/questions/66057170/cannot-load-netcdf4-due-to-missing-dll-file

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...