Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyonmttok installation fails while installing OpenNMT-py with python 3.12 #329

Open
ramanirudh opened this issue May 31, 2024 · 1 comment

Comments

@ramanirudh
Copy link

ramanirudh commented May 31, 2024

Had difficulty installing pyonmttok on Redhat 9.4 with python 3.12, while all other dependencies have been resolved smoothly. The error goes like (similar to https://github.com/OpenNMT/OpenNMT-py/issues/1770 ):
No local packages or working download links found for pyonmttok<2,>=1.37 . error: Could not find suitable distribution for Requirement.parse('pyonmttok').

Figured out hard way that (https://pypi.org/simple/pyonmttok/) does not have the required .whl file for python 3.12. Installation was successful with python 3.11.

This is to request you to mention in Readme.md the requirement of python<3.12

@royshil
Copy link

royshil commented Jun 22, 2024

no whl but you can build from source

roughly

$ cmake .. -DICU_ROOT="..." -DCMAKE_INSTALL_PREFIX="./dist" # best use abs paths
$ cmake --build . --config Release
$ cmake --install .
$ cd ../bindings/python
$ pip install wheel setuptools --upgrade # for good measure
$ $env:TOKENIZER_ROOT="../../build/dist" # use abs path here
$ pip install .

that'll pip install for 3.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants