Hey Sander,
We are trying to install harp on a windows 10 machine, without using conda. The machine has the following installed:
Python 3.10.8
numpy 1.23.4
cffi 1.15.1
The binary from here:
https://stcorp.github.io/harp/doc/html/install.html#installing-the-binary-package-windows
was installed.
The directory was copied, as per the instructions, however during import the follow error appears:
OSError: cannot load library ‘harp.dll’: error 0x7e
My colleague, who is working on this, told me that she thinks that cffi is trying to open the .dll and can’t:
lib = ffi.dlopen(clib)
I saw a different thread on this issue, but the discussion stopped in its infancy.
Many thanks for the help,
MariLiza
Be aware that the python interface to HARP requires the HARP package to stay installed as well (make sure you install the ‘core’ component when using the 1.16 binary installer).
If your python script says it can’t find harp.dll, then it likely means that the bin directory of the HARP installation is not on the PATH. The HARP installer modifies the system PATH environment setting to add its own bin directory to it, but it sometimes requires a relogin or restart to get this environment setting to work. Also, make sure you are not overriding the PATH yourself (or, if you do, add the HARP bin directory manually to it yourself).
1 Like
Will try both and let you know!
Cheers,
MariLiza
Hi Sander,
Sorry to say that the solutions proposed did not work. The Harp bin path is the Path of the system Environment Variables, and we did restart the machine a couple of times, it still complains about finding the *dll. See image.
My colleague also tried hardwiring the bin path directory in the code [if I am explaining this right] and it still did not work.
Before we pack it up and try via anaconda, any more suggestions maybe? do you know of anyone using Visual Studio on windows 10 with harp who might give us a pointer or two?
Many thanks,
MariLiza
Then the problem is likely due to a library that harp.dll depends on and cannot be found/loaded.
Did you install the Microsoft Visual C++ Redistributable Packages for Visual Studio 2015 package?
Otherwise, could you please use a tool like Dependencies and open harp.dll in it to check if you are missing any dependency libraries?
Dear Sander,
We are still working on this issue. The Visual C++ package is indeed installed. My colleague is going to check the Dependencies and we will let you know.
Thanks!
Good morning Sander,
My colleague used the Dependencies tool you recommended and found out that this dll is missing
ext-ms-win-oobe-query-l1-1-0.dll
Furthermore, I just read on the official windows forum that:
Can’t run old Windows installers on Windows 10 - Microsoft Community
Any ideas? did someone else encounter this issue lately?
Many thanks,
MariLiza
I was able to reproduce it myself. If you try to run the command line executable (e.g. harpdump) from a command prompt then Windows will actually tell you which .dlls are missing.
In this case it isn’t ext-ms-win-oobe-query-l1-1-0.dll, but several dependencies of the hdf5 library that we ship with the installer: libcrypto-3-x64.dll, libcurl.dll, libssh2.dll, and zlib.dll.
We will add these to the installer for our next HARP release (which should arrive soon).
1 Like
Thanks Sander, we’ll wait for the next HARP release and hope it solves our issue.
Just FYI, instead of adding these additional dependencies we will switch to including a version of the HDF5 library that does not require these additional dependencies.
1 Like