Installation#

Basics#

First install Python >= 3.10, PyTorch >=v.2.0.0 and git.

Create and activate a virtual environment to install the package into:

$ python -m venv jnmt
$ source jnmt/bin/activate

Cloning#

Then clone JoeyNMT from GitHub and switch to its root directory:

(jnmt)$ git clone https://github.com/joeynmt/joeynmt.git
(jnmt)$ cd joeynmt

Note

For Windows users, we recommend to doublecheck whether txt files (i.e. test/data/toy/*) have utf-8 encoding.

Installing JoeyNMT#

Install JoeyNMT and its requirements:

(jnmt)$ python -m pip install -e .

Run the unit tests to make sure your installation is working:

(jnmt)$ python -m unittest

Warning

When running on GPU you need to manually install the suitable PyTorch version for your CUDA version. This is described in the PyTorch installation instructions.

You’re ready to go!