-
Notifications
You must be signed in to change notification settings - Fork 1
Error on import llstring #1
Copy link
Copy link
Open
Description
Hey Charlie, this is Mark from the HG team. I installed LLString by cloning the repo and the running pip install LLString/llstring, but I get a problem when I try to import it. This is not a problem if I put the package directly into my python path (instead of using pip), but I thought you might want to know anyway.
(venv) temp $ python
Python 3.5.1 (default, Apr 26 2016, 15:20:12)
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import llstring
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/mhaase/Downloads/temp/venv/lib/python3.5/site-packages/llstring/__init__.py", line 13, in <module>
import matching, training, utilities
ImportError: No module named 'matching'
The error can be avoided (and the affected code can be simplified) with this patch:
diff --git a/llstring/llstring/__init__.py b/llstring/llstring/__init__.py
index 74a0009..6926814 100644
--- a/llstring/llstring/__init__.py
+++ b/llstring/llstring/__init__.py
@@ -5,8 +5,6 @@ Jaro-Winkler Similarity and Soft TF-IDF Similarity) as well
as provides a variety of basic string processing/normalization
tools.
"""
-from pkgutil import extend_path as __extend_path
-__path__ = __extend_path(__path__, __name__)
__all__ = ['matching','training','utilities']
-import matching, training, utilities
+from . import matching, training, utilities
Let me know what you think!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels