pattern icon indicating copy to clipboard operation
pattern copied to clipboard

ModuleNotFoundError: No module named 'pattern.en'

Open harsham05 opened this issue 6 years ago • 6 comments

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'

harsham05 avatar Jul 03 '18 19:07 harsham05

As mentioned in the README, I ended up Putting the pattern folder in the same folder as my script. which worked

harsham05 avatar Jul 03 '18 21:07 harsham05

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) in () 3 if MODULE not in sys.path: 4 sys.path.append(MODULE) ----> 5 from pattern.en import parsetree

ModuleNotFoundError: No module named 'pattern.en'

iamyihwa avatar Jul 04 '18 11:07 iamyihwa

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 avatar Dec 05 '18 05:12 Diwahars

@Diwahars @iamyihwa It appears that it should actually be "pattern.text.en" instead. Like import pattern.text.en.

blackredscarf avatar Feb 15 '19 07:02 blackredscarf

@blackredscarf When I use import pattern.text.en I get:

ModuleNotFoundError: No module named 'pattern.text'

JamesCreasyWN avatar Sep 22 '21 20:09 JamesCreasyWN

@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?

42694647426 avatar Nov 10 '23 22:11 42694647426