bheinzerling / bpemb

Pre-trained subword embeddings in 275 languages, based on Byte-Pair Encoding (BPE)
https://nlp.h-its.org/bpemb
MIT License
1.18k stars 101 forks source link

Syntax error while importing #24

Closed amansrivastava17 closed 5 years ago

amansrivastava17 commented 5 years ago

Some syntax error is occurring while importing.

SyntaxError: Non-ASCII character '\xe2' in file /home/aman/.local/lib/python2.7/site-packages/bpemb/bpemb.py on line 29, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

bheinzerling commented 5 years ago

This is a Python 2.7 issue: Non-ASCII characters are not allowed in source files unless you declare an encoding. Would upgrading to Python 3.7 be an option for you? Python 2.7 is nearing its end of life (https://pythonclock.org/) and major packages like numpy will also stop supporting it: https://docs.scipy.org/doc/numpy-1.14.2/neps/dropping-python2.7-proposal.html