GreynirCorrect runs on CPython 3.8 or newer, and on PyPy 3.8 or newer (more info on PyPy here).
On GNU/Linux and similar systems, you may need to have python3-dev
installed on your system:
# Debian or Ubuntu:
$ sudo apt-get install python3-dev
Depending on your system, you may also need to install libffi-dev
:
# Debian or Ubuntu:
$ sudo apt-get install libffi-dev
On Windows, you may need the latest Visual Studio Build Tools, specifically the Visual C++ build tools, installed on your PC along with the Windows 10 SDK.
To install GreynirCorrect:
$ pip install reynir-correct
...or if you want to be able to edit GreynirCorrect's source code in-place,
install git
and do the following:
$ mkdir ~/github
$ cd ~/github
$ git clone https://github.com/mideind/GreynirCorrect
$ cd GreynirCorrect
$ pip install -e .
On the most common Linux x86_64/amd64 systems, pip
will download and
install a binary wheel. On other systems, a source distribution will be
downloaded and compiled to binary.
Pull requests are welcome in the project's GitHub repository.
In many cases, you will want to maintain a separate Python environment for
your project that uses GreynirCorrect. For this, you can use virtualenv
(if you haven't already, install it with pip install virtualenv
):
$ virtualenv -p python3 venv
# Enter the virtual environment
$ source venv/bin/activate
# Install GreynirCorrect into it
$ pip install reynir-correct
$ python
[ Use Python with GreynirCorrect ]
# Leave the virtual environment
$ deactivate
On Windows:
C:\MyProject> virtualenv venv
REM Enter the virtual environment
C:\MyProject> venv/Scripts/activate
REM Install GreynirCorrect into it
(venv) C:\MyProject> pip install reynir-correct
(venv) C:\MyProject> python
REM [ Use Python with GreynirCorrect ]
REM Leave the virtual environment
(venv) C:\MyProject> deactivate
More information about virtualenv is available here.