码迷,mamicode.com
首页 > 其他好文 > 详细

安装polyglot出现的错误

时间:2020-04-20 16:02:03      阅读:140      评论:0      收藏:0      [点我收藏+]

标签:cheng   tps   sso   lock   python3   ast   bsp   otf   apt   

系统环境ubuntu python3.6

pip3 install polyglot

 

运行错误:

import polyglot
from polyglot.text import Text, Word

ICU_VERSION = subprocess.check_output((‘icu-config’, ‘–version’)).strip()

Error 1 :No module named ‘icu’

---> 11 from icu import Locale
     12 import pycld2 as cld2

ModuleNotFoundError: No module named ‘icu‘

 

解决方法:

[root@master]# pip3 install pyicu

Error 2:  installing pip pyicu

# 解决
sudo apt install libicu-dev #or yum install libicu-dev

  

Error 3:No module named ‘pycld2‘ \ No module named ‘morfessor‘

# 解决
pip3 install pycld2 pip3 install morfessor

  

Error 4: No module named ‘_bz2’

from _bz2 import BZ2Compressor, BZ2Decompressor

ModuleNotFoundError: No module named ‘morfessor‘

ModuleNotFoundError: No module named ‘_bz2‘

 

# 解决
[root@7-o-1 ~]# cd /usr/local/lib/python3.6/lib-dynload/ wget https://github.com/LockeyCheng/packages/blob/master/_bz2.cpython-36m-x86_64-linux-gnu.so [root@7-o-1 lib-dynload]# chmod u+x _bz2.cpython-36m-x86_64-linux-gnu.so

  

安装polyglot出现的错误

标签:cheng   tps   sso   lock   python3   ast   bsp   otf   apt   

原文地址:https://www.cnblogs.com/harp-yestar/p/12737811.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!