fonttools / pyclipper

Cython wrapper for the C++ translation of the Angus Johnson's Clipper library (ver. 6.4.2)
MIT License
233 stars 42 forks source link

Windows: Dependency on msvcp140.dll intentional? #20

Open madig opened 6 years ago

madig commented 6 years ago

I wasted an hour yesterday trying to track down why pyclipper (installed from PyPI) wouldn't import on a freshly installed Windows 10 PC with Python 3. Turns out the above mentioned DLL was not found (which the ImportError didn't tell me...). I was wondering if the dependency is strictly necessary?

anthrotype commented 6 years ago

any libraries or executables compiled with Visual Studio 2015 need the corresponding MSVC runtime DLLs installed https://www.microsoft.com/en-us/download/details.aspx?id=48145

but python3 itself should come with that already, no?

anthrotype commented 6 years ago

does it change anything if you try from a virtualenv or python3 venv as opposed to from the global py -3 in the %PATH%?

madig commented 6 years ago

Okay, good to know.

No, that didn't change anything. In fact, there was no msvcp140.dll anywhere in C:\ except if e.g. VS Code bundled it for private use.

anthrotype commented 6 years ago

This may be relevant: https://github.com/cztomczak/cefpython/issues/359

Apparently Cpython only ships with the C runtime library, not the C++ one, so extension modules that use C++ need the extra step of installing the redistributable dlls from MS.

I’m not sure if it’s appropriate/worth embedding them in the wheels.

anthrotype commented 6 years ago

I think we just need to make this clear in the README.md with respective download links to the Microsoft website, one for each python version/MSVC/C++ redistributable DLLs that we support.