VerbalExpressions / PythonVerbalExpressions

Python regular expressions made easy
1.63k stars 115 forks source link

failing on Anaconda (Windows) #27

Closed dmvianna closed 6 years ago

dmvianna commented 7 years ago

This is VerbalExpressions-0.0.1, which is the version in pypi.

$ ipython
Python 3.6.1 |Anaconda 4.4.0 (64-bit)| (default, May 11 2017, 13:25:24) [MSC v.1900 64
 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 5.3.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import verbalexpressions
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-31be79f170ac> in <module>()
----> 1 import verbalexpressions

C:\ProgramData\Anaconda3\envs\pydata\lib\site-packages\verbalexpressions\__init__.py i
n <module>()
----> 1 from verbal_expressions import VerEx, re_escape

ModuleNotFoundError: No module named 'verbal_expressions'
fthbrmnby commented 6 years ago

Maybe it's little bit late for an answer but for anyone who gets this error, change the following line: from verbal_expressions import VerEx, re_escape with this from .verbal_expressions import VerEx, re_escape (Just added a dot at the begining of the module name) in the init.py file of the Verbal Expressions. The location for the file is printed at the error logs. For @dmvianna it's C:\ProgramData\Anaconda3\envs\pydata\lib\site-packages\verbalexpressions__init__.py Hope this helps.

dmvianna commented 6 years ago

Hi, Fatih. Thank you for your comment!

Would you be able to submit a pull request? I don't think it would be best practice to manually change library code in order to use it. This is a bug, it should be fixed upstream.

vtitor commented 6 years ago

The fix is already released: https://pypi.org/project/VerbalExpressions/0.0.2/