diff --git a/docs/installation.md b/docs/installation.md index a4f9193937324acac7a7f4c9d4f8e97bb7e90bee..f6c3fff9e3d697581d196a5fba746587f8322a6e 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -21,7 +21,9 @@ Run `conda install -c conda-forge jsonnet=0.15.0` and re-run installation. * No package 'sentencepiece' found -Run `pip install sentencepiece==0.1.83` and re-run installation. +Run `pip install sentencepiece==0.1.83` for Python < 3.8 and re-run installation. + +Run `pip install sentencepiece==0.1.85` for Python >= 3.8 and re-run installation. * Missing Cython error diff --git a/setup.py b/setup.py index 89e8208501b1b085f414a023ade6b8336e5865f2..a66027fb72fc02babc3bf055b7431580bc7e766b 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,8 @@ REQUIREMENTS = [ 'numpy==1.19.4', 'overrides==3.1.0', 'requests==2.23.0', - 'sentencepiece==0.1.83', + 'sentencepiece==0.1.83;python_version<"3.8"', + 'sentencepiece==0.1.85;python_version>="3.8"', 'spacy==2.3.2', 'scikit-learn<=0.23.2', 'torch==1.6.0',