pattern
pattern copied to clipboard
ModuleNotFoundError: No module named 'pattern.en'
I was able to install pattern from the development
branch. But I am unable to import pattern.en
?
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 18:10:19)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import pattern
>>>
>>> from pattern.en import parsetree
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pattern.en'
As mentioned in the README, I ended up Putting the pattern folder in the same folder as my script.
which worked
Hello in my case I have tried that option from the README file, (changing it to my own path)
MODULE = '/users/tom/desktop/pattern'
import sys; if MODULE not in sys.path: sys.path.append(MODULE)
from pattern.en import parsetree
but still get the same error.
ModuleNotFoundError Traceback (most recent call last)
ModuleNotFoundError: No module named 'pattern.en'
I have tried the option from Readme.md
But still i get the same error ModuleNotFoundError: No module named 'pattern.en'
Can someone help me here?
@Diwahars @iamyihwa
It appears that it should actually be "pattern.text.en" instead.
Like import pattern.text.en
.
@blackredscarf When I use import pattern.text.en I get:
ModuleNotFoundError: No module named 'pattern.text'
@blackredscarf When I use import pattern.text.en I get:
ModuleNotFoundError: No module named 'pattern.text'
I got the same problem! How to fix it?