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. You can also see testing logs here.

Ubuntu

  1. Install dependencies
$ sudo apt-get install g++ openjdk-7-jdk python-dev python3-dev   # Install Java 1.7 or up
$ pip install JPype1        # Python 2.x
$ pip3 install JPype1-py3   # Python 3.x
  1. Install KoNLPy
$ pip install konlpy        # Python 2.x
$ pip3 install konlpy       # Python 3.x
  1. Install MeCab (optional)
$ sudo apt-get install curl
$ bash <(curl -s https://raw.githubusercontent.com/konlpy/konlpy/master/scripts/mecab.sh)

CentOS

  1. 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

$ pip install JPype1        # Python 2.x
$ pip3 install JPype1-py3   # Python 3.x
  1. Install KoNLPy
$ pip install konlpy        # Python 2.x
$ pip3.4 install konlpy     # Python 3.x
  1. Install MeCab (optional)
$ sudo yum install curl
$ bash <(curl -s https://raw.githubusercontent.com/konlpy/konlpy/master/scripts/mecab.sh)

Mac OS

  1. Install dependencies
$ pip install JPype1         # Python 2.x
$ pip3 install JPype1-py3    # Python 3.x
  1. Install KoNLPy
$ pip install konlpy         # Python 2.x
$ pip3 install konlpy        # Python 3.x
  1. Install MeCab (optional)
$ bash <(curl -s https://raw.githubusercontent.com/konlpy/konlpy/master/scripts/mecab.sh)

Windows

  1. Do you have Java 1.7+ installed? If not, download and install JDK.

  2. Set JAVA_HOME.

  3. Does your Python installation bit version match your Windows OS? If you’re using a 64 bit Windows, you need a 64 bit Python, rather than a 32 bit Python. Reinstall Python if your versions do not match.
    • How to check your Windows bit version

      ../_images/windows-bits.png
    • How to check your Python bit version

      ../_images/python-bits.png
  4. Download and install JPype1 (>=0.5.7). [1] 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
  1. From the command prompt, install KoNLPy.
> pip install konlpy

Warning

  • KoNLPy’s Mecab() class is not supported on Windows machines.
[1]win-amd64 for 64-bit Windows, win32 for 32-bit Windows.