LibreTranslate / LibreTranslate

Free and Open Source Machine Translation API. Self-hosted, offline capable and easy to setup.
https://libretranslate.com
GNU Affero General Public License v3.0
7.13k stars 682 forks source link

Unable to install on Ubuntu 24.04 LTS #611

Open markrsmith83 opened 2 months ago

markrsmith83 commented 2 months ago

While attempting to install LibreTranslate using LibreTranslate-init, it fails at the pip install ~/LibreTranslate step with this error:

ERROR: Could not find a version that satisfies the requirement torch==2.0.1 (from libretranslate) (from versions: 2.2.0, 2.2.1, 2.2.2, 2.3.0) ERROR: No matching distribution found for torch==2.0.1

24.04 installs Python 3.12 by default.

PJ-Finlay commented 2 months ago

This is a know issue with Python 3.12 and SentencePiece. The fix is in progress now

https://community.libretranslate.com/t/upgrade-sentencepiece-to-support-python-3-12/1060

markrsmith83 commented 2 months ago

This is a know issue with Python 3.12 and SentencePiece. The fix is in progress now

https://community.libretranslate.com/t/upgrade-sentencepiece-to-support-python-3-12/1060

That worked for me, except that I had to update pyproject.toml because torch 2.0.1 wasn't an option on python 3.12.