Skip to content

import in python 2.7 #5

@wannaphong

Description

@wannaphong

import in python 2.7 9f0a1f2

>>> from pythainlp.segment import segment
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Anaconda3-new\envs\python2\lib\site-packages\pythainlp\__init__.py", line 12, in <module>
    from . import postaggers
  File "C:\Anaconda3-new\envs\python2\lib\site-packages\pythainlp\postaggers\__init__.py", line 2, in <module>
    from .text import tag
  File "C:\Anaconda3-new\envs\python2\lib\site-packages\pythainlp\postaggers\text.py", line 7, in <module>
    import nltk.tag, nltk.data
  File "C:\Anaconda3-new\envs\python2\lib\site-packages\nltk\__init__.py", line 128, in <module>
    from nltk.chunk import *
  File "C:\Anaconda3-new\envs\python2\lib\site-packages\nltk\chunk\__init__.py", line 155, in <module>
    from nltk.data import load
  File "C:\Anaconda3-new\envs\python2\lib\site-packages\nltk\data.py", line 77, in <module>
    if 'APPENGINE_RUNTIME' not in os.environ and os.path.expanduser('~/') != '~/':
  File "C:\Anaconda3-new\envs\python2\lib\ntpath.py", line 311, in expanduser
    return userhome + path[i:]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc7 in position 9: ordinal not in range(128)
>>> from pythainlp.rank import rank
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Anaconda3-new\envs\python2\lib\site-packages\pythainlp\__init__.py", line 6, in <module>
    from . import romanization
ImportError: cannot import name romanization
>>> from pythainlp.romanization import romanization
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Anaconda3-new\envs\python2\lib\site-packages\pythainlp\__init__.py", line 6, in <module>
    from . import romanization
ImportError: cannot import name romanization
>>> b=romanization("แมว")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'romanization' is not defined
>>> from pythainlp.number import numtowords
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Anaconda3-new\envs\python2\lib\site-packages\pythainlp\__init__.py", line 6, in <module>
    from . import romanization
ImportError: cannot import name romanization

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugbugs in the library

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions