Git Product home page Git Product logo

Comments (7)

cutright avatar cutright commented on June 9, 2024 1

Thanks Max, I think I'll add a try/except clause in my code and have my documentation point to yours if the name prediction doesn't work.

from rapidfuzz.

maxbachmann avatar maxbachmann commented on June 9, 2024

Yes this did change. Until v0.8.0 the C++ implementation was placed in rapidfuzz._fuzz and was imported in rapidfuzz.fuzz. The reason for this was, that the C++ version did not support a processor and therefore inside rapidfuzz.fuzz it would simply preprocess the strings and then call the C++ version.
However since calling python functions is really slow I added support for the processor argument in v0.8.0 and removed the intermediate python function. So now rapidfuzz.fuzz is the C++ implementation and rapidfuzz._fuzz does no longer exist. The same was done with rapidfuzz.utils.
46cf20a#diff-2eeaed663bd0d25b7e608891384b7298

from rapidfuzz.

cutright avatar cutright commented on June 9, 2024

OK... but the from rapidfuzz._fuzz import * is not in my code... it must be somewhere in RapidFuzz? The only reference to rapidfuzz in my code is here:

https://github.com/cutright/DVH-Analytics/blob/master/dvha/tools/name_prediction.py#L1

from rapidfuzz.

cutright avatar cutright commented on June 9, 2024

The reason I was thinking PyPI is maybe you used to upload windows wheels? I'm really not well-versed in PyPI, but the DLL note is what trigged my comment. I just tried my project with rapidfuzz 0.9.1 on macOS with no issues. I asked my user for his version... unfortunately I personally won't have access to MSW until Thursday.

from rapidfuzz.

maxbachmann avatar maxbachmann commented on June 9, 2024

Ah reading the error again I am pretty sure I know what the problem is. It appears he is using a version where rapidfuzz._fuzz still existed, but Python is not able to find this. The reason for this is, that on Windows the C++ redistributable is required to find C++ libraries. I do not have a barebone Windows installation here, but as far as I remember Windows 10 only comes with the 2013 version, but since rapidfuzz is using C++14 it is using a more recent version. The more recent versions 2015, 2017 and 2019 are now all part of the 2019 version. https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads

I added this to the new docs aswell https://maxbachmann.github.io/rapidfuzz/installation/, since others did already run into this aswell.

from rapidfuzz.

cutright avatar cutright commented on June 9, 2024

OK. This is starting to make sense. Although, I don't have C++ installed on my MSW7 computer at work. Again.. this is why I was learning toward wheels. Maybe there's just not a wheel for his environment?

@MohammadSalehi72 this comment above may help your rapidfuzz issue

from rapidfuzz.

maxbachmann avatar maxbachmann commented on June 9, 2024

When there is no wheel + he has no C++ compiler it would already fail to install and when he has a C++ compiler and it builds it for him, he would be able to find the dll. So I guess there was a wheel (there should always be one for Windows 10), but the C++ redistributable is used by a lot of programs, so it might very well be, that it was already installed on your system.

I am not super familar with Windows (mostly using Linux), so I did not find a way yet, to either install this for the user, or to throw him at least a warning, that he has to install the C++ redistributable, since the dll import error is not really user friendly.

from rapidfuzz.

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.