Closed edoardo-kolver closed 4 months ago
You may wish to consider running delvewheel
during the release process for kiwisolver. This is what bundles the msvc runtime for Matplotlib (and adds a hash to avoid problems that can potentially occur because of the innards of python loading dlls... namely clobbering potentially incompatible versions loaded by different python modules... here is the discussion from delvewheel's readme as to why they do name mangling by default)
Here is the CIBW docs about it, note it is not used by default on windows, though similar tools are used on mac/linux builds by default by CIBW:
Here is the lines which enable it in Matplotlib:
Crosspost from matplotlib. Not sure who's at fault here. The DLL is not missing, it just has a hash in the filename for some reason, that kiwisolver cannot find. Installing the VS runtime does NOT solve this problem. Making a copy of the DLL with the fixed filename (without the hash) solves the problem.
importing matplotlib 3.9.0 (with kiwisolver 1.4.5 and also tested with kiwisolver 1.3.1) on windows 10 gives this error: (importing kiwisolver alone has the same issue):
Installing the visual studio redistributable runtime does NOT solve this issue.
However, in my site-packages/matplotlib.libs directory, I have this file: msvcp140-(here some sort of long garbage hash).dll If I make a copy of this file in the same directory, renaming it msvcp140.dll (so that I have both files, one with the hash and one without), then importing matplotlib works and so does importing kiwisolver.
This only happens on Windows 10. On Windows 11, it seems to find the DLL somehow. But the DLL is already there. Kiwisolver just needs to be able to locate it with the hash in the name. I don't know why there is a hash in the name, but matplotlib needs it (if you just rename the DLL, matplotlib fails, you need both named versions)