luozhouyang / python-string-similarity

A library implementing different string similarity and distance measures using Python.
MIT License
991 stars 127 forks source link

Undeclared dependency: Numpy #18

Closed keddad closed 4 years ago

keddad commented 4 years ago

Hi! I've installed latest version from pip, and get a ModuleNotFoundError:

  File "/home/keddad/Documents/thevyshka-news-fetcher/cacher.py", line 6, in <module>
    from strsimpy.ngram import NGram
  File "/home/keddad/.local/share/virtualenvs/thevyshka-news-fetcher-8gFlsF9b/lib/python3.8/site-packages/strsimpy/__init__.py", line 30, in <module>
    from .optimal_string_alignment import OptimalStringAlignment
  File "/home/keddad/.local/share/virtualenvs/thevyshka-news-fetcher-8gFlsF9b/lib/python3.8/site-packages/strsimpy/optimal_string_alignment.py", line 21, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'

There already was #12 about this error, and it was said that latest version doesn't need numpy, but, apparently, it does: https://github.com/luozhouyang/python-string-similarity/blob/6b8fbd68a535bf92f849bc624d58fd99ef8f46b1/strsimpy/optimal_string_alignment.py

luozhouyang commented 4 years ago

Hi, @keddad I can reproduce this bug! I will fixed it soon!