Benjamin-Loison / 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
1 stars 0 forks source link

*RuntimeError: Numpy is not available* #11

Closed Benjamin-Loison closed 3 months ago

Benjamin-Loison commented 3 months ago
pip install libretranslate
Collecting libretranslate
  Downloading libretranslate-1.6.0-py3-none-any.whl.metadata (76 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 76.3/76.3 kB 11.5 MB/s eta 0:00:00
Collecting appdirs==1.4.4 (from libretranslate)
  Downloading appdirs-1.4.4-py2.py3-none-any.whl.metadata (9.0 kB)
Collecting apscheduler==3.9.1 (from libretranslate)
  Downloading APScheduler-3.9.1-py2.py3-none-any.whl.metadata (6.2 kB)
Collecting argos-translate-files==1.1.4 (from libretranslate)
  Downloading argos_translate_files-1.1.4-py3-none-any.whl.metadata (1.3 kB)
Collecting argostranslate==1.9.6 (from libretranslate)
  Downloading argostranslate-1.9.6-py3-none-any.whl.metadata (10 kB)
Collecting expiringdict==1.2.2 (from libretranslate)
  Downloading expiringdict-1.2.2-py3-none-any.whl.metadata (3.7 kB)
Collecting flask-babel==3.1.0 (from libretranslate)
  Downloading flask_babel-3.1.0-py3-none-any.whl.metadata (2.2 kB)
Collecting flask-limiter==2.6.3 (from libretranslate)
  Downloading Flask_Limiter-2.6.3-py3-none-any.whl.metadata (4.5 kB)
Collecting flask-session==0.4.0 (from libretranslate)
  Downloading Flask_Session-0.4.0-py2.py3-none-any.whl.metadata (924 bytes)
Collecting flask-swagger-ui==4.11.1 (from libretranslate)
  Downloading flask_swagger_ui-4.11.1-py3-none-any.whl.metadata (2.4 kB)
Collecting flask-swagger==0.2.14 (from libretranslate)
  Downloading flask-swagger-0.2.14.tar.gz (8.6 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting flask==2.2.5 (from libretranslate)
  Downloading Flask-2.2.5-py3-none-any.whl.metadata (3.9 kB)
Collecting itsdangerous==2.1.2 (from libretranslate)
  Downloading itsdangerous-2.1.2-py3-none-any.whl.metadata (2.9 kB)
Collecting langdetect==1.0.9 (from libretranslate)
  Downloading langdetect-1.0.9.tar.gz (981 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 981.5/981.5 kB 28.6 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting lexilang==1.0.1 (from libretranslate)
  Downloading LexiLang-1.0.1-py3-none-any.whl.metadata (2.4 kB)
Collecting morfessor==2.0.6 (from libretranslate)
  Downloading Morfessor-2.0.6-py3-none-any.whl.metadata (628 bytes)
Collecting packaging==23.1 (from libretranslate)
  Downloading packaging-23.1-py3-none-any.whl.metadata (3.1 kB)
Collecting polib==1.1.1 (from libretranslate)
  Downloading polib-1.1.1-py2.py3-none-any.whl.metadata (14 kB)
Collecting prometheus-client==0.15.0 (from libretranslate)
  Downloading prometheus_client-0.15.0-py3-none-any.whl.metadata (22 kB)
Collecting redis==4.4.4 (from libretranslate)
  Downloading redis-4.4.4-py3-none-any.whl.metadata (8.2 kB)
Collecting requests==2.31.0 (from libretranslate)
  Downloading requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting torch==2.0.1 (from libretranslate)
  Downloading torch-2.0.1-cp311-cp311-manylinux1_x86_64.whl.metadata (24 kB)
Collecting translatehtml==1.5.2 (from libretranslate)
  Downloading translatehtml-1.5.2-py3-none-any.whl.metadata (888 bytes)
Collecting waitress==2.1.2 (from libretranslate)
  Downloading waitress-2.1.2-py3-none-any.whl.metadata (7.0 kB)
Collecting werkzeug==2.3.8 (from libretranslate)
  Downloading werkzeug-2.3.8-py3-none-any.whl.metadata (4.1 kB)
Requirement already satisfied: setuptools>=0.7 in /home/benjamin_loison/venv/lib/python3.11/site-packages (from apscheduler==3.9.1->libretranslate) (70.3.0)
Requirement already satisfied: six>=1.4.0 in /home/benjamin_loison/venv/lib/python3.11/site-packages (from apscheduler==3.9.1->libretranslate) (1.16.0)
Requirement already satisfied: pytz in /home/benjamin_loison/venv/lib/python3.11/site-packages (from apscheduler==3.9.1->libretranslate) (2024.1)
Requirement already satisfied: tzlocal!=3.*,>=2.0 in /home/benjamin_loison/venv/lib/python3.11/site-packages (from apscheduler==3.9.1->libretranslate) (5.2)
Collecting beautifulsoup4>=4.9.3 (from argos-translate-files==1.1.4->libretranslate)
  Downloading beautifulsoup4-4.12.3-py3-none-any.whl.metadata (3.8 kB)
Collecting lxml>=4.9.2 (from argos-translate-files==1.1.4->libretranslate)
  Downloading lxml-5.2.2-cp311-cp311-manylinux_2_28_x86_64.whl.metadata (3.4 kB)
Collecting ctranslate2<5,>=4.0 (from argostranslate==1.9.6->libretranslate)
  Downloading ctranslate2-4.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (10 kB)
Collecting sacremoses==0.0.53 (from argostranslate==1.9.6->libretranslate)
  Downloading sacremoses-0.0.53.tar.gz (880 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 880.6/880.6 kB 27.9 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting sentencepiece==0.2.0 (from argostranslate==1.9.6->libretranslate)
  Downloading sentencepiece-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (7.7 kB)
Collecting stanza==1.1.1 (from argostranslate==1.9.6->libretranslate)
  Downloading stanza-1.1.1-py3-none-any.whl.metadata (10 kB)
Requirement already satisfied: Jinja2>=3.0 in /home/benjamin_loison/venv/lib/python3.11/site-packages (from flask==2.2.5->libretranslate) (3.1.4)
Requirement already satisfied: click>=8.0 in /home/benjamin_loison/venv/lib/python3.11/site-packages (from flask==2.2.5->libretranslate) (8.1.7)
Requirement already satisfied: Babel>=2.12 in /home/benjamin_loison/venv/lib/python3.11/site-packages (from flask-babel==3.1.0->libretranslate) (2.15.0)
Collecting limits>=2.3 (from flask-limiter==2.6.3->libretranslate)
  Downloading limits-3.13.0-py3-none-any.whl.metadata (7.2 kB)
Collecting rich<13,>=12 (from flask-limiter==2.6.3->libretranslate)
  Downloading rich-12.6.0-py3-none-any.whl.metadata (18 kB)
Requirement already satisfied: typing-extensions>=4 in /home/benjamin_loison/venv/lib/python3.11/site-packages (from flask-limiter==2.6.3->libretranslate) (4.12.2)
Collecting cachelib (from flask-session==0.4.0->libretranslate)
  Downloading cachelib-0.13.0-py3-none-any.whl.metadata (2.0 kB)
Requirement already satisfied: PyYAML>=5.1 in /home/benjamin_loison/venv/lib/python3.11/site-packages (from flask-swagger==0.2.14->libretranslate) (6.0.1)
Collecting async-timeout>=4.0.2 (from redis==4.4.4->libretranslate)
  Downloading async_timeout-4.0.3-py3-none-any.whl.metadata (4.2 kB)
Requirement already satisfied: charset-normalizer<4,>=2 in /home/benjamin_loison/venv/lib/python3.11/site-packages (from requests==2.31.0->libretranslate) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /home/benjamin_loison/venv/lib/python3.11/site-packages (from requests==2.31.0->libretranslate) (3.7)
Requirement already satisfied: urllib3<3,>=1.21.1 in /home/benjamin_loison/venv/lib/python3.11/site-packages (from requests==2.31.0->libretranslate) (2.2.2)
Requirement already satisfied: certifi>=2017.4.17 in /home/benjamin_loison/venv/lib/python3.11/site-packages (from requests==2.31.0->libretranslate) (2024.7.4)
Requirement already satisfied: filelock in /home/benjamin_loison/venv/lib/python3.11/site-packages (from torch==2.0.1->libretranslate) (3.15.4)
Requirement already satisfied: sympy in /home/benjamin_loison/venv/lib/python3.11/site-packages (from torch==2.0.1->libretranslate) (1.13.0)
Requirement already satisfied: networkx in /home/benjamin_loison/venv/lib/python3.11/site-packages (from torch==2.0.1->libretranslate) (3.3)
Collecting nvidia-cuda-nvrtc-cu11==11.7.99 (from torch==2.0.1->libretranslate)
  Downloading nvidia_cuda_nvrtc_cu11-11.7.99-2-py3-none-manylinux1_x86_64.whl.metadata (1.5 kB)
Collecting nvidia-cuda-runtime-cu11==11.7.99 (from torch==2.0.1->libretranslate)
  Downloading nvidia_cuda_runtime_cu11-11.7.99-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)
Collecting nvidia-cuda-cupti-cu11==11.7.101 (from torch==2.0.1->libretranslate)
  Downloading nvidia_cuda_cupti_cu11-11.7.101-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)
Collecting nvidia-cudnn-cu11==8.5.0.96 (from torch==2.0.1->libretranslate)
  Downloading nvidia_cudnn_cu11-8.5.0.96-2-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)
Collecting nvidia-cublas-cu11==11.10.3.66 (from torch==2.0.1->libretranslate)
  Downloading nvidia_cublas_cu11-11.10.3.66-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)
Collecting nvidia-cufft-cu11==10.9.0.58 (from torch==2.0.1->libretranslate)
  Downloading nvidia_cufft_cu11-10.9.0.58-py3-none-manylinux1_x86_64.whl.metadata (1.5 kB)
Collecting nvidia-curand-cu11==10.2.10.91 (from torch==2.0.1->libretranslate)
  Downloading nvidia_curand_cu11-10.2.10.91-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)
Collecting nvidia-cusolver-cu11==11.4.0.1 (from torch==2.0.1->libretranslate)
  Downloading nvidia_cusolver_cu11-11.4.0.1-2-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)
Collecting nvidia-cusparse-cu11==11.7.4.91 (from torch==2.0.1->libretranslate)
  Downloading nvidia_cusparse_cu11-11.7.4.91-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)
Collecting nvidia-nccl-cu11==2.14.3 (from torch==2.0.1->libretranslate)
  Downloading nvidia_nccl_cu11-2.14.3-py3-none-manylinux1_x86_64.whl.metadata (1.8 kB)
Collecting nvidia-nvtx-cu11==11.7.91 (from torch==2.0.1->libretranslate)
  Downloading nvidia_nvtx_cu11-11.7.91-py3-none-manylinux1_x86_64.whl.metadata (1.7 kB)
Collecting triton==2.0.0 (from torch==2.0.1->libretranslate)
  Downloading triton-2.0.0-1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (1.0 kB)
Collecting beautifulsoup4>=4.9.3 (from argos-translate-files==1.1.4->libretranslate)
  Downloading beautifulsoup4-4.9.3-py3-none-any.whl.metadata (4.2 kB)
Requirement already satisfied: MarkupSafe>=2.1.1 in /home/benjamin_loison/venv/lib/python3.11/site-packages (from werkzeug==2.3.8->libretranslate) (2.1.5)
Collecting soupsieve>1.2 (from beautifulsoup4>=4.9.3->argos-translate-files==1.1.4->libretranslate)
  Downloading soupsieve-2.5-py3-none-any.whl.metadata (4.7 kB)
Collecting wheel (from nvidia-cublas-cu11==11.10.3.66->torch==2.0.1->libretranslate)
  Using cached wheel-0.43.0-py3-none-any.whl.metadata (2.2 kB)
Requirement already satisfied: regex in /home/benjamin_loison/venv/lib/python3.11/site-packages (from sacremoses==0.0.53->argostranslate==1.9.6->libretranslate) (2024.5.15)
Requirement already satisfied: joblib in /home/benjamin_loison/venv/lib/python3.11/site-packages (from sacremoses==0.0.53->argostranslate==1.9.6->libretranslate) (1.4.2)
Requirement already satisfied: tqdm in /home/benjamin_loison/venv/lib/python3.11/site-packages (from sacremoses==0.0.53->argostranslate==1.9.6->libretranslate) (4.66.4)
Requirement already satisfied: numpy in /home/benjamin_loison/venv/lib/python3.11/site-packages (from stanza==1.1.1->argostranslate==1.9.6->libretranslate) (2.0.0)
Requirement already satisfied: protobuf in /home/benjamin_loison/venv/lib/python3.11/site-packages (from stanza==1.1.1->argostranslate==1.9.6->libretranslate) (5.27.2)
Collecting cmake (from triton==2.0.0->torch==2.0.1->libretranslate)
  Downloading cmake-3.30.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.1 kB)
Collecting lit (from triton==2.0.0->torch==2.0.1->libretranslate)
  Downloading lit-18.1.8-py3-none-any.whl.metadata (2.5 kB)
Collecting deprecated>=1.2 (from limits>=2.3->flask-limiter==2.6.3->libretranslate)
  Downloading Deprecated-1.2.14-py2.py3-none-any.whl.metadata (5.4 kB)
Collecting importlib-resources>=1.3 (from limits>=2.3->flask-limiter==2.6.3->libretranslate)
  Downloading importlib_resources-6.4.0-py3-none-any.whl.metadata (3.9 kB)
Collecting commonmark<0.10.0,>=0.9.0 (from rich<13,>=12->flask-limiter==2.6.3->libretranslate)
  Downloading commonmark-0.9.1-py2.py3-none-any.whl.metadata (5.7 kB)
Requirement already satisfied: pygments<3.0.0,>=2.6.0 in /home/benjamin_loison/venv/lib/python3.11/site-packages (from rich<13,>=12->flask-limiter==2.6.3->libretranslate) (2.18.0)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in /home/benjamin_loison/venv/lib/python3.11/site-packages (from sympy->torch==2.0.1->libretranslate) (1.3.0)
Requirement already satisfied: wrapt<2,>=1.10 in /home/benjamin_loison/venv/lib/python3.11/site-packages (from deprecated>=1.2->limits>=2.3->flask-limiter==2.6.3->libretranslate) (1.16.0)
WARNING: The candidate selected for download or install is a yanked version: 'apscheduler' candidate (version 3.9.1 at https://files.pythonhosted.org/packages/e4/9f/c3937d4babe62504b874d4bf2c0d85aa69c7f59fa84cf6050f3b9dc5d83e/APScheduler-3.9.1-py2.py3-none-any.whl (from https://pypi.org/simple/apscheduler/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4))
Reason for being yanked: Not compatible with Python 2.7
Downloading libretranslate-1.6.0-py3-none-any.whl (865 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 865.0/865.0 kB 28.6 MB/s eta 0:00:00
Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Downloading APScheduler-3.9.1-py2.py3-none-any.whl (59 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.5/59.5 kB 6.7 MB/s eta 0:00:00
Downloading argos_translate_files-1.1.4-py3-none-any.whl (9.5 kB)
Downloading argostranslate-1.9.6-py3-none-any.whl (34 kB)
Downloading expiringdict-1.2.2-py3-none-any.whl (8.5 kB)
Downloading Flask-2.2.5-py3-none-any.whl (101 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 101.8/101.8 kB 11.7 MB/s eta 0:00:00
Downloading flask_babel-3.1.0-py3-none-any.whl (9.6 kB)
Downloading Flask_Limiter-2.6.3-py3-none-any.whl (25 kB)
Downloading Flask_Session-0.4.0-py2.py3-none-any.whl (7.5 kB)
Downloading flask_swagger_ui-4.11.1-py3-none-any.whl (1.4 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 33.4 MB/s eta 0:00:00
Downloading itsdangerous-2.1.2-py3-none-any.whl (15 kB)
Downloading LexiLang-1.0.1-py3-none-any.whl (1.6 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 29.8 MB/s eta 0:00:00
Downloading Morfessor-2.0.6-py3-none-any.whl (35 kB)
Downloading packaging-23.1-py3-none-any.whl (48 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.9/48.9 kB 11.0 MB/s eta 0:00:00
Downloading polib-1.1.1-py2.py3-none-any.whl (20 kB)
Downloading prometheus_client-0.15.0-py3-none-any.whl (60 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.1/60.1 kB 14.5 MB/s eta 0:00:00
Downloading redis-4.4.4-py3-none-any.whl (238 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 238.0/238.0 kB 29.0 MB/s eta 0:00:00
Downloading requests-2.31.0-py3-none-any.whl (62 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 kB 15.0 MB/s eta 0:00:00
Downloading torch-2.0.1-cp311-cp311-manylinux1_x86_64.whl (619.9 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 619.9/619.9 MB 6.8 MB/s eta 0:00:00
Downloading translatehtml-1.5.2-py3-none-any.whl (3.3 kB)
Downloading waitress-2.1.2-py3-none-any.whl (57 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.7/57.7 kB 6.0 MB/s eta 0:00:00
Downloading werkzeug-2.3.8-py3-none-any.whl (242 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 242.3/242.3 kB 18.3 MB/s eta 0:00:00
Downloading beautifulsoup4-4.9.3-py3-none-any.whl (115 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 115.8/115.8 kB 14.5 MB/s eta 0:00:00
Downloading nvidia_cublas_cu11-11.10.3.66-py3-none-manylinux1_x86_64.whl (317.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 317.1/317.1 MB 13.3 MB/s eta 0:00:00
Downloading nvidia_cuda_cupti_cu11-11.7.101-py3-none-manylinux1_x86_64.whl (11.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.8/11.8 MB 33.3 MB/s eta 0:00:00
Downloading nvidia_cuda_nvrtc_cu11-11.7.99-2-py3-none-manylinux1_x86_64.whl (21.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 21.0/21.0 MB 31.7 MB/s eta 0:00:00
Downloading nvidia_cuda_runtime_cu11-11.7.99-py3-none-manylinux1_x86_64.whl (849 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 849.3/849.3 kB 29.0 MB/s eta 0:00:00
Downloading nvidia_cudnn_cu11-8.5.0.96-2-py3-none-manylinux1_x86_64.whl (557.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 557.1/557.1 MB 6.9 MB/s eta 0:00:00
Downloading nvidia_cufft_cu11-10.9.0.58-py3-none-manylinux1_x86_64.whl (168.4 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 168.4/168.4 MB 18.5 MB/s eta 0:00:00
Downloading nvidia_curand_cu11-10.2.10.91-py3-none-manylinux1_x86_64.whl (54.6 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.6/54.6 MB 26.5 MB/s eta 0:00:00
Downloading nvidia_cusolver_cu11-11.4.0.1-2-py3-none-manylinux1_x86_64.whl (102.6 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 102.6/102.6 MB 23.1 MB/s eta 0:00:00
Downloading nvidia_cusparse_cu11-11.7.4.91-py3-none-manylinux1_x86_64.whl (173.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 173.2/173.2 MB 19.2 MB/s eta 0:00:00
Downloading nvidia_nccl_cu11-2.14.3-py3-none-manylinux1_x86_64.whl (177.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 177.1/177.1 MB 14.7 MB/s eta 0:00:00
Downloading nvidia_nvtx_cu11-11.7.91-py3-none-manylinux1_x86_64.whl (98 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.6/98.6 kB 20.6 MB/s eta 0:00:00
Downloading sentencepiece-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 30.2 MB/s eta 0:00:00
Downloading stanza-1.1.1-py3-none-any.whl (227 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 227.6/227.6 kB 20.2 MB/s eta 0:00:00
Downloading triton-2.0.0-1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (63.3 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.3/63.3 MB 26.2 MB/s eta 0:00:00
Downloading async_timeout-4.0.3-py3-none-any.whl (5.7 kB)
Downloading ctranslate2-4.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (192.5 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 192.5/192.5 MB 17.6 MB/s eta 0:00:00
Downloading limits-3.13.0-py3-none-any.whl (45 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 45.5/45.5 kB 4.9 MB/s eta 0:00:00
Downloading lxml-5.2.2-cp311-cp311-manylinux_2_28_x86_64.whl (5.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.0/5.0 MB 32.5 MB/s eta 0:00:00
Downloading rich-12.6.0-py3-none-any.whl (237 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 237.5/237.5 kB 19.2 MB/s eta 0:00:00
Downloading cachelib-0.13.0-py3-none-any.whl (20 kB)
Downloading commonmark-0.9.1-py2.py3-none-any.whl (51 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 51.1/51.1 kB 12.2 MB/s eta 0:00:00
Downloading Deprecated-1.2.14-py2.py3-none-any.whl (9.6 kB)
Downloading importlib_resources-6.4.0-py3-none-any.whl (38 kB)
Downloading soupsieve-2.5-py3-none-any.whl (36 kB)
Downloading cmake-3.30.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (26.9 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 26.9/26.9 MB 30.7 MB/s eta 0:00:00
Downloading lit-18.1.8-py3-none-any.whl (96 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.4/96.4 kB 10.8 MB/s eta 0:00:00
Using cached wheel-0.43.0-py3-none-any.whl (65 kB)
Building wheels for collected packages: flask-swagger, langdetect, sacremoses
  Building wheel for flask-swagger (pyproject.toml) ... done
  Created wheel for flask-swagger: filename=flask_swagger-0.2.14-py3-none-any.whl size=7248 sha256=f1d234bc768352cc218a9f86c07b7c098a4b5897a89368f229ed48ed42f1fe4c
  Stored in directory: /home/benjamin_loison/.cache/pip/wheels/48/c3/3c/d4b74af9151dde31d4046a62dce341d7d3bdfcd3fe8cc17642
  Building wheel for langdetect (pyproject.toml) ... done
  Created wheel for langdetect: filename=langdetect-1.0.9-py3-none-any.whl size=993220 sha256=c417e7a4083eb0beb8613ce545158a7d5f068f1d21e7363d17f4833e64bbc423
  Stored in directory: /home/benjamin_loison/.cache/pip/wheels/0a/f2/b2/e5ca405801e05eb7c8ed5b3b4bcf1fcabcd6272c167640072e
  Building wheel for sacremoses (pyproject.toml) ... done
  Created wheel for sacremoses: filename=sacremoses-0.0.53-py3-none-any.whl size=895240 sha256=ce0aa80fe0132dfe21473698eab09263fccc3886bfb96b2d8a5898db498ab798
  Stored in directory: /home/benjamin_loison/.cache/pip/wheels/11/75/c6/a82d827a00df823caf211262900d2c024f5b3a775b82b45230
Successfully built flask-swagger langdetect sacremoses
Installing collected packages: sentencepiece, polib, morfessor, lit, lexilang, expiringdict, commonmark, appdirs, wheel, werkzeug, waitress, soupsieve, sacremoses, rich, requests, prometheus-client, packaging, nvidia-nccl-cu11, nvidia-cufft-cu11, nvidia-cuda-nvrtc-cu11, lxml, langdetect, itsdangerous, importlib-resources, deprecated, ctranslate2, cmake, cachelib, async-timeout, apscheduler, redis, nvidia-nvtx-cu11, nvidia-cusparse-cu11, nvidia-curand-cu11, nvidia-cuda-runtime-cu11, nvidia-cuda-cupti-cu11, nvidia-cublas-cu11, limits, flask, beautifulsoup4, nvidia-cusolver-cu11, nvidia-cudnn-cu11, flask-swagger-ui, flask-swagger, flask-session, flask-limiter, flask-babel, triton, torch, stanza, argostranslate, translatehtml, argos-translate-files, libretranslate
  Attempting uninstall: werkzeug
    Found existing installation: Werkzeug 3.0.3
    Uninstalling Werkzeug-3.0.3:
      Successfully uninstalled Werkzeug-3.0.3
  Attempting uninstall: rich
    Found existing installation: rich 13.7.1
    Uninstalling rich-13.7.1:
      Successfully uninstalled rich-13.7.1
  Attempting uninstall: requests
    Found existing installation: requests 2.32.3
    Uninstalling requests-2.32.3:
      Successfully uninstalled requests-2.32.3
  Attempting uninstall: packaging
    Found existing installation: packaging 24.1
    Uninstalling packaging-24.1:
      Successfully uninstalled packaging-24.1
  Attempting uninstall: itsdangerous
    Found existing installation: itsdangerous 2.2.0
    Uninstalling itsdangerous-2.2.0:
      Successfully uninstalled itsdangerous-2.2.0
  Attempting uninstall: flask
    Found existing installation: Flask 3.0.3
    Uninstalling Flask-3.0.3:
      Successfully uninstalled Flask-3.0.3
  Attempting uninstall: triton
    Found existing installation: triton 3.0.0
    Uninstalling triton-3.0.0:
      Successfully uninstalled triton-3.0.0
  Attempting uninstall: torch
    Found existing installation: torch 2.3.1
    Uninstalling torch-2.3.1:
      Successfully uninstalled torch-2.3.1
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tts 0.22.0 requires gruut[de,es,fr]==2.2.3, but you have gruut 2.4.0 which is incompatible.
tts 0.22.0 requires pandas<2.0,>=1.4, but you have pandas 2.2.2 which is incompatible.
tts 0.22.0 requires torch>=2.1, but you have torch 2.0.1 which is incompatible.
torchaudio 2.3.1 requires torch==2.3.1, but you have torch 2.0.1 which is incompatible.
transformers 4.42.3 requires numpy<2.0,>=1.17, but you have numpy 2.0.0 which is incompatible.
spacy 3.7.5 requires thinc<8.3.0,>=8.2.2, but you have thinc 9.0.0 which is incompatible.
tensorboard 2.17.0 requires protobuf!=4.24.0,<5.0.0,>=3.19.6, but you have protobuf 5.27.2 which is incompatible.
thinc 9.0.0 requires blis<0.8.0,>=0.7.8, but you have blis 0.9.1 which is incompatible.
Successfully installed appdirs-1.4.4 apscheduler-3.9.1 argos-translate-files-1.1.4 argostranslate-1.9.6 async-timeout-4.0.3 beautifulsoup4-4.9.3 cachelib-0.13.0 cmake-3.30.0 commonmark-0.9.1 ctranslate2-4.3.1 deprecated-1.2.14 expiringdict-1.2.2 flask-2.2.5 flask-babel-3.1.0 flask-limiter-2.6.3 flask-session-0.4.0 flask-swagger-0.2.14 flask-swagger-ui-4.11.1 importlib-resources-6.4.0 itsdangerous-2.1.2 langdetect-1.0.9 lexilang-1.0.1 libretranslate-1.6.0 limits-3.13.0 lit-18.1.8 lxml-5.2.2 morfessor-2.0.6 nvidia-cublas-cu11-11.10.3.66 nvidia-cuda-cupti-cu11-11.7.101 nvidia-cuda-nvrtc-cu11-11.7.99 nvidia-cuda-runtime-cu11-11.7.99 nvidia-cudnn-cu11-8.5.0.96 nvidia-cufft-cu11-10.9.0.58 nvidia-curand-cu11-10.2.10.91 nvidia-cusolver-cu11-11.4.0.1 nvidia-cusparse-cu11-11.7.4.91 nvidia-nccl-cu11-2.14.3 nvidia-nvtx-cu11-11.7.91 packaging-23.1 polib-1.1.1 prometheus-client-0.15.0 redis-4.4.4 requests-2.31.0 rich-12.6.0 sacremoses-0.0.53 sentencepiece-0.2.0 soupsieve-2.5 stanza-1.1.1 torch-2.0.1 translatehtml-1.5.2 triton-2.0.0 waitress-2.1.2 werkzeug-2.3.8 wheel-0.43.0
libretranslate
Updating language models
Found 88 models
Downloading Albanian → English (1.9) ...
Downloading Arabic → English (1.0) ...
Downloading Azerbaijani → English (1.5) ...
Downloading Bengali → English (1.9) ...
Downloading Bulgarian → English (1.9) ...
Downloading Catalan → English (1.7) ...
Downloading Chinese (traditional) → English (1.9) ...
Downloading Chinese → English (1.9) ...
Downloading Czech → English (1.9) ...
Downloading Danish → English (1.3) ...
Downloading Dutch → English (1.8) ...
Downloading English → Albanian (1.9) ...
Downloading English → Arabic (1.0) ...
Downloading English → Azerbaijani (1.5) ...
Downloading English → Bengali (1.9) ...
Downloading English → Bulgarian (1.9) ...
Downloading English → Catalan (1.9) ...
Downloading English → Chinese (1.9) ...
Downloading English → Chinese (traditional) (1.9) ...
Downloading English → Czech (1.9) ...
Downloading English → Danish (1.3) ...
Downloading English → Dutch (1.8) ...
Downloading English → Esperanto (1.5) ...
Downloading English → Estonian (1.9) ...
Downloading English → Finnish (1.5) ...
Downloading English → French (1.9) ...
Downloading English → German (1.0) ...
Downloading English → Greek (1.9) ...
Downloading English → Hebrew (1.5) ...
Downloading English → Hindi (1.1) ...
Downloading English → Hungarian (1.5) ...
Downloading English → Indonesian (1.2) ...
Downloading English → Irish (1.1) ...
Downloading English → Italian (1.0) ...
Downloading English → Japanese (1.1) ...
Downloading English → Korean (1.1) ...
Downloading English → Latvian (1.9) ...
Downloading English → Lithuanian (1.9) ...
Downloading English → Malay (1.9) ...
Downloading English → Norwegian (1.9) ...
Downloading English → Persian (1.5) ...
Downloading English → Polish (1.9) ...
Downloading English → Portuguese (1.0) ...
Downloading English → Romanian (1.9) ...
Downloading English → Russian (1.9) ...
Downloading English → Slovak (1.5) ...
Downloading English → Slovenian (1.9) ...
Downloading English → Spanish (1.0) ...
Downloading English → Swedish (1.5) ...
Downloading English → Tagalog (1.9) ...
Downloading English → Thai (1.9) ...
Downloading English → Turkish (1.5) ...
Downloading English → Ukranian (1.4) ...
Downloading English → Urdu (1.9) ...
Downloading Esperanto → English (1.5) ...
Downloading Estonian → English (1.9) ...
Downloading Finnish → English (1.5) ...
Downloading French → English (1.9) ...
Downloading German → English (1.0) ...
Downloading Greek → English (1.9) ...
Downloading Hebrew → English (1.5) ...
Downloading Hindi → English (1.1) ...
Downloading Hungarian → English (1.5) ...
Downloading Indonesian → English (1.2) ...
Downloading Irish → English (1.1) ...
Downloading Italian → English (1.0) ...
Downloading Japanese → English (1.1) ...
Downloading Korean → English (1.1) ...
Downloading Latvian → English (1.9) ...
Downloading Lithuanian → English (1.9) ...
Downloading Malay → English (1.9) ...
Downloading Norwegian → English (1.9) ...
Downloading Persian → English (1.5) ...
Downloading Polish → English (1.9) ...
Downloading Portuguese → English (1.0) ...
Downloading Portuguese → Spanish (1.0) ...
Downloading Romanian → English (1.9) ...
Downloading Russian → English (1.9) ...
Downloading Slovak → English (1.5) ...
Downloading Slovenian → English (1.9) ...
Downloading Spanish → English (1.0) ...
Downloading Spanish → Portuguese (1.0) ...
Downloading Swedish → English (1.5) ...
Downloading Tagalog → English (1.9) ...
Downloading Thai → English (1.9) ...
Downloading Turkish → English (1.5) ...
Downloading Ukranian → English (1.4) ...
Downloading Urdu → English (1.9) ...
Loaded support for 44 languages (88 models total)!
Running on http://127.0.0.1:5000
WARNING:waitress.queue:Task queue depth is 1
WARNING:waitress.queue:Task queue depth is 2
WARNING:waitress.queue:Task queue depth is 1
WARNING:waitress.queue:Task queue depth is 2

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last):  File "/usr/lib/python3.11/threading.py", line 995, in _bootstrap
    self._bootstrap_inner()
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/waitress/task.py", line 84, in handler_thread
    task.service()
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/waitress/channel.py", line 428, in service
    task.service()
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/waitress/task.py", line 168, in service
    self.execute()
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/waitress/task.py", line 434, in execute
    app_iter = self.channel.server.application(environ, start_response)
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/flask/app.py", line 2552, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/flask/app.py", line 2529, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/libretranslate/app.py", line 349, in time_func
    return func(*a, **kw)
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/libretranslate/app.py", line 323, in func
    return f(*a, **kw)
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/libretranslate/app.py", line 686, in translate
    hypotheses = translator.hypotheses(q, num_alternatives + 1)
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/argostranslate/translate.py", line 296, in hypotheses
    translated_paragraph = self.underlying.hypotheses(
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/argostranslate/translate.py", line 173, in hypotheses
    apply_packaged_translation(
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/argostranslate/translate.py", line 418, in apply_packaged_translation
    stanza_pipeline = stanza.Pipeline(
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/pipeline/core.py", line 111, in __init__
    self.processors[processor_name] = NAME_TO_PROCESSOR_CLASS[processor_name](config=curr_processor_config,
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/pipeline/processor.py", line 146, in __init__
    self._set_up_model(config, use_gpu)
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/pipeline/tokenize_processor.py", line 38, in _set_up_model
    self._trainer = Trainer(model_file=config['model_path'], use_cuda=use_gpu)
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/models/tokenize/trainer.py", line 19, in __init__
    self.load(model_file)
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/models/tokenize/trainer.py", line 85, in load
    checkpoint = torch.load(filename, lambda storage, loc: storage)
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/torch/serialization.py", line 815, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/torch/serialization.py", line 1043, in _legacy_load
    result = unpickler.load()
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/torch/serialization.py", line 975, in persistent_load
    obj = cast(Storage, torch.UntypedStorage(nbytes))
/home/benjamin_loison/venv/lib/python3.11/site-packages/torch/serialization.py:975: UserWarning: Failed to initialize NumPy: _ARRAY_API not found (Triggered internally at ../torch/csrc/utils/tensor_numpy.cpp:84.)
  obj = cast(Storage, torch.UntypedStorage(nbytes))
ERROR:libretranslate.app:Exception on /translate [POST]
Traceback (most recent call last):
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/flask/app.py", line 2529, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/libretranslate/app.py", line 349, in time_func
    return func(*a, **kw)
           ^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/libretranslate/app.py", line 323, in func
    return f(*a, **kw)
           ^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/libretranslate/app.py", line 699, in translate
    raise e
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/libretranslate/app.py", line 686, in translate
    hypotheses = translator.hypotheses(q, num_alternatives + 1)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/argostranslate/translate.py", line 296, in hypotheses
    translated_paragraph = self.underlying.hypotheses(
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/argostranslate/translate.py", line 173, in hypotheses
    apply_packaged_translation(
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/argostranslate/translate.py", line 425, in apply_packaged_translation
    stanza_sbd = stanza_pipeline(input_text)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/pipeline/core.py", line 166, in __call__
    doc = self.process(doc)
          ^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/pipeline/core.py", line 160, in process
    doc = self.processors[processor_name].process(doc)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/pipeline/tokenize_processor.py", line 85, in process
    _, _, _, document = output_predictions(None, self.trainer, batches, self.vocab, None,
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/models/tokenize/utils.py", line 85, in output_predictions
    batch = data_generator.next(eval_offsets=offsets)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/models/tokenize/data.py", line 206, in next
    units, labels, features = list(map(convert, [(units, np.int64), (labels, np.int64), (features, np.float32)]))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/models/tokenize/data.py", line 204, in <lambda>
    convert = lambda t: (torch.from_numpy(np.array(t[0], dtype=t[1])))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Numpy is not available
ERROR:libretranslate.app:Exception on /translate [POST]
Traceback (most recent call last):
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/flask/app.py", line 2529, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/libretranslate/app.py", line 349, in time_func
    return func(*a, **kw)
           ^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/libretranslate/app.py", line 323, in func
    return f(*a, **kw)
           ^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/libretranslate/app.py", line 699, in translate
    raise e
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/libretranslate/app.py", line 686, in translate
    hypotheses = translator.hypotheses(q, num_alternatives + 1)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/argostranslate/translate.py", line 296, in hypotheses
    translated_paragraph = self.underlying.hypotheses(
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/argostranslate/translate.py", line 173, in hypotheses
    apply_packaged_translation(
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/argostranslate/translate.py", line 425, in apply_packaged_translation
    stanza_sbd = stanza_pipeline(input_text)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/pipeline/core.py", line 166, in __call__
    doc = self.process(doc)
          ^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/pipeline/core.py", line 160, in process
    doc = self.processors[processor_name].process(doc)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/pipeline/tokenize_processor.py", line 85, in process
    _, _, _, document = output_predictions(None, self.trainer, batches, self.vocab, None,
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/models/tokenize/utils.py", line 85, in output_predictions
    batch = data_generator.next(eval_offsets=offsets)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/models/tokenize/data.py", line 206, in next
    units, labels, features = list(map(convert, [(units, np.int64), (labels, np.int64), (features, np.float32)]))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/models/tokenize/data.py", line 204, in <lambda>
    convert = lambda t: (torch.from_numpy(np.array(t[0], dtype=t[1])))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Numpy is not available
WARNING:waitress.queue:Task queue depth is 1
WARNING:waitress.queue:Task queue depth is 2
WARNING:waitress.queue:Task queue depth is 1
WARNING:waitress.queue:Task queue depth is 1
WARNING:waitress.queue:Task queue depth is 2
ERROR:libretranslate.app:Exception on /translate [POST]
Traceback (most recent call last):
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/flask/app.py", line 2529, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/libretranslate/app.py", line 349, in time_func
    return func(*a, **kw)
           ^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/libretranslate/app.py", line 323, in func
    return f(*a, **kw)
           ^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/libretranslate/app.py", line 699, in translate
    raise e
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/libretranslate/app.py", line 686, in translate
    hypotheses = translator.hypotheses(q, num_alternatives + 1)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/argostranslate/translate.py", line 296, in hypotheses
    translated_paragraph = self.underlying.hypotheses(
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/argostranslate/translate.py", line 173, in hypotheses
    apply_packaged_translation(
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/argostranslate/translate.py", line 425, in apply_packaged_translation
    stanza_sbd = stanza_pipeline(input_text)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/pipeline/core.py", line 166, in __call__
    doc = self.process(doc)
          ^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/pipeline/core.py", line 160, in process
    doc = self.processors[processor_name].process(doc)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/pipeline/tokenize_processor.py", line 85, in process
    _, _, _, document = output_predictions(None, self.trainer, batches, self.vocab, None,
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/models/tokenize/utils.py", line 85, in output_predictions
    batch = data_generator.next(eval_offsets=offsets)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/models/tokenize/data.py", line 206, in next
    units, labels, features = list(map(convert, [(units, np.int64), (labels, np.int64), (features, np.float32)]))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/benjamin_loison/venv/lib/python3.11/site-packages/stanza/models/tokenize/data.py", line 204, in <lambda>
    convert = lambda t: (torch.from_numpy(np.array(t[0], dtype=t[1])))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Numpy is not available

Please do NOT ask question about LibreTranslate here! We have a forum at https://community.libretranslate.com for questions.

Please open an issue only to report faults and bugs.

For feature requests, please open pull requests directly! We accept all kinds of contributions. If you don't know how to code, you can still provide feedback, but please offer to contribute something (how are you going to help the project develop the feature?)

Remove these lines after reading it


Benjamin-Loison commented 3 months ago
pip install 'numpy<2.0.0'
Collecting numpy<2.0.0
  Using cached numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB)
Using cached numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.3 MB)
Installing collected packages: numpy
  Attempting uninstall: numpy
    Found existing installation: numpy 2.0.0
    Uninstalling numpy-2.0.0:
      Successfully uninstalled numpy-2.0.0
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tts 0.22.0 requires gruut[de,es,fr]==2.2.3, but you have gruut 2.4.0 which is incompatible.
tts 0.22.0 requires pandas<2.0,>=1.4, but you have pandas 2.2.2 which is incompatible.
tts 0.22.0 requires torch>=2.1, but you have torch 2.0.1 which is incompatible.
gruut 2.4.0 requires dateparser~=1.1.1, but you have dateparser 1.2.0 which is incompatible.
gruut 2.4.0 requires jsonlines~=1.2.0, but you have jsonlines 4.0.0 which is incompatible.
spacy 3.7.5 requires thinc<8.3.0,>=8.2.2, but you have thinc 9.0.0 which is incompatible.
tensorboard 2.17.0 requires protobuf!=4.24.0,<5.0.0,>=3.19.6, but you have protobuf 5.27.2 which is incompatible.
rawpy 0.22.0 requires numpy>=2.0, but you have numpy 1.26.4 which is incompatible.
thinc 9.0.0 requires blis<0.8.0,>=0.7.8, but you have blis 0.9.1 which is incompatible.
Successfully installed numpy-1.26.4

solves the issue.

Maybe should use a specific virtual environment as for instance rawpy that I work with uses Numpy 2.0.0.