Installation¶
Note
For troubleshooting information, see these pages: Linux. Mac OS. Windows. Please record a “New Issue” if you have an error that is not listed.
Ubuntu¶
Install dependencies
# Install Java 1.7 or up $ sudo apt-get install g++ openjdk-7-jdk python-dev python3-dev
Install KoNLPy
$ pip install konlpy # Python 2.x $ pip3 install konlpy # Python 3.x
Install MeCab (optional)
$ sudo apt-get install curl $ bash <(curl -s https://raw.githubusercontent.com/konlpy/konlpy/master/scripts/mecab.sh)
CentOS¶
Install dependencies
$ sudo yum install gcc-c++ java-1.7.0-openjdk-devel python-devel $ wget http://peak.telecommunity.com/dist/ez_setup.py # Python 2.x $ sudo python ez_setup.py $ sudo easy_install pip $ wget https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tar.xz # Python 3.x $ tar xf Python-3.* $ cd Python-3.* $ ./configure $ make # Build $ sudo make altinstall
Install KoNLPy
$ pip install konlpy # Python 2.x $ pip3.4 install konlpy # Python 3.x
Install MeCab (optional)
$ sudo yum install curl $ bash <(curl -s https://raw.githubusercontent.com/konlpy/konlpy/master/scripts/mecab.sh)
Mac OS¶
Install KoNLPy
$ pip install konlpy # Python 2.x $ pip3 install konlpy # Python 3.x
Install MeCab (optional)
$ bash <(curl -s https://raw.githubusercontent.com/konlpy/konlpy/master/scripts/mecab.sh)
Windows¶
- Does your Python installation’s “bit version” match your Windows OS? If you’re using a 64 bit Windows you need a 64 bit Python, and if you have a 32 bit Windows, you need a 32 bit Python. Reinstall your Python if your bit versions do not match.
How to check your Windows bit version
How to check your Python bit version
Do you have a Java of version 1.7 or above installed, that matches your OS bit version? If not, download and install a JDK. Note again, that the bit versions must match.
Set JAVA_HOME.
Download and install the JPype1 (>=0.5.7) that matches your bit version: win32 for 32 bit and win-amd64 for 64 bit. You may have to upgrade your pip in order to install the downloaded .whl file.
> pip install --upgrade pip > pip install JPype1-0.5.7-cp27-none-win_amd64.whl
From the command prompt, install KoNLPy.
> pip install konlpy
Warning
- KoNLPy’s
Mecab()
class is not supported on Windows machines.