1. 程式人生 > >ubuntu環境下python3.5安裝pyltp

ubuntu環境下python3.5安裝pyltp

安裝完成pip之後,可以使用pip安裝pyltp

sudo pip3 install pyltp

命令報錯

error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

在stackoverflow中可以查到解決方法:

https://stackoverflow.com/questions/26053982/error-setup-script-exited-with-error-command-x86-64-linux-gnu-gcc-failed-wit

輸入下面命令,解決問題:

sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev
libssl-dev

然後執行

sudo pip3 install pyltp

安裝成功。