I've installed GrepFunc with:
pip install grepfunc
But when i try to import it in my Jupiter Notebook with:
from grepfunc import grep
i get a Error massage:
No module named 'grepfunc'
1) I checked if grepfunc was installed with:
pip list
And the answer is yes. But I couldn’t find this library among other installed packages
2) Then I downloaded the code from original GitHub link, and copied this to /username/anaconda3/lib/python3.7/grepfunc/ , where are the other libraries.
In this case, when I ran from grepfunc import grep, I get no more any errors. But during an attempt to use the grap function itself, I received the following errors:
StopIteration Traceback (most recent call last) ~/anaconda3/lib/python3.7/grepfunc/grepfunc.py in grep_iter(target, pattern, **kwargs) 234 # done iteration --> 235 raise StopIteration 236
StopIteration:
The above exception was the direct cause of the following exception:
RuntimeError Traceback (most recent call last) in 2 3 # grep titles with the word 'dog' in them. Note: i=True will ignore case. ----> 4 grep(movies, "dog")
~/anaconda3/lib/python3.7/grepfunc/grepfunc.py in grep(target, pattern, **kwargs) 94 # use the grep_iter to build the return list 95 ret = [] ---> 96 for value in grep_iter(target, pattern, **kwargs): 97 98 # if quiet mode no need to continue, just return True because we got a value
RuntimeError: generator raised StopIteration