HIT-SCIR / pyltp

pyltp: the python extension for LTP
1.53k stars 353 forks source link

import pyltp error: undefined symbol: _ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev #223

Closed wjx-git closed 4 years ago

wjx-git commented 4 years ago

在提问之前,请确认以下几点:

问题类型

导入错误

出错场景

pip install pyltp成功,但是import pyltp出错。 pyltp==0.2.1 ImportError: /home/xxx/anaconda3/lib/python3.6/site-packages/pyltp.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev

代码片段

如何复现这一错误

运行环境

ubuntu 20.4 python3.6 Anaconda 5.2.0 Pycharm 2020.1.3 gcc 9.3.0

期望结果

其他

Please ensure your issue adheres to the following guidelines:

What is affected by this bug?

When does this occur?

Where on the code does it happen?

How do we replicate the issue?

Your environment information

Expected behavior (i.e. solution)

Other Comments

AlongWY commented 4 years ago

请问你是自己编译安装的还是 pip 安装的

wjx-git commented 4 years ago

请问你是自己编译安装的还是 pip 安装的

pip安装的

wjx-git commented 4 years ago

安装pyltp==0.3.0就解决了。 目前 pip 只能安装 0.2.1 版本的, 0.3.0版本到按照 git 上源码编译方法安装。