Code Monkey home page Code Monkey logo

Comments (6)

MatthieuDartiailh avatar MatthieuDartiailh commented on July 20, 2024

Sadly I cannot embed Microsoft Visual C++ redistributable 2015 (or 2017 which is binary compatible) in the wheels. The best I can do is add a detailed explanation of the issue and of how to fix it in the documentation.

from kiwi.

MatthieuDartiailh avatar MatthieuDartiailh commented on July 20, 2024

I will close when the documentation will have been updated.

from kiwi.

jonascj avatar jonascj commented on July 20, 2024

I'm not a regular Windows user, still now I feel dumb for not looking for a Windows library dependency analyzer, that would have saved me a ton of trying and searching: http://www.dependencywalker.com/

Updating the documentation is as good as it gets I think. Nothing can be done to show "you are likely missing Microsoft Visual C++ redistributable 2015/2017" on import errors, right? Apart from maybe making a wrapper module which imports the real deal and throws that message ...

from kiwi.

MatthieuDartiailh avatar MatthieuDartiailh commented on July 20, 2024

I don't fancy adding a Python module to handle that kind of error report. However matplotlib could add such a safety around the import of kiwisolver. Something along the following lines:

try:
    import kiwisolver as kiwi
except ImportError as ex:
    if sys.platform == 'win32' and 'DLL' in ex.msg:
        msg = ('You may be missing Microsoft Visual C++ redistributable '
               'matching your Python version. Consult Kiwisolver '
               'documentation for more details.'
        raise ImportError(msg) from ex
    else:
        raise

I do not have access to a windows machine on which to test anytime soon @jonascj . Could you test and open a PR against matplotlib ?

from kiwi.

jonascj avatar jonascj commented on July 20, 2024

Sure could, I actually just suggested something similar here:

matplotlib/matplotlib#14315

And that should be added the first place kiwisolver is imported, I think that is in _check_versions() in lib/matplotlib/__init__.py, at least that is what throws the error.

from kiwi.

jonascj avatar jonascj commented on July 20, 2024

Your suggested code works, thanks. I submitted a PR containing it: matplotlib/matplotlib#14316

from kiwi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.