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

LibreTranslate 1.5.7 with Python 3.12.3 under Windows: Issues installing #620

Closed
domasofan opened this issue May 6, 2024 · 7 comments
Closed

Comments

@domasofan
Copy link

Hi all,

Just tried to install LibreTranslate 1.5.7 under Windows.
I get some errors which you can see below.
I attached the whole output.
I have Python 3.12.3 installed.

So i created a virtual environment with

$ mkdir libretranslate
$ python -m venv .
$ cd libretranslate
$ pip install libretranslate

Collecting libretranslate
Using cached libretranslate-1.5.7-py3-none-any.whl.metadata (76 kB)
Collecting appdirs==1.4.4 (from libretranslate)
Using cached appdirs-1.4.4-py2.py3-none-any.whl.metadata (9.0 kB)
Collecting apscheduler==3.9.1 (from libretranslate)
Using cached APScheduler-3.9.1-py2.py3-none-any.whl.metadata (6.2 kB)
Collecting argos-translate-files==1.1.4 (from libretranslate)
Using cached argos_translate_files-1.1.4-py3-none-any.whl.metadata (1.3 kB)
Collecting argostranslate==1.9.1 (from libretranslate)
Using cached argostranslate-1.9.1-py3-none-any.whl.metadata (9.7 kB)
Collecting expiringdict==1.2.2 (from libretranslate)
Using cached expiringdict-1.2.2-py3-none-any.whl.metadata (3.7 kB)
Collecting flask-babel==3.1.0 (from libretranslate)
Using cached flask_babel-3.1.0-py3-none-any.whl.metadata (2.2 kB)
Collecting flask-limiter==2.6.3 (from libretranslate)
Using cached Flask_Limiter-2.6.3-py3-none-any.whl.metadata (4.5 kB)
Collecting flask-session==0.4.0 (from libretranslate)
Using cached Flask_Session-0.4.0-py2.py3-none-any.whl.metadata (924 bytes)
Collecting flask-swagger-ui==4.11.1 (from libretranslate)
Using cached flask_swagger_ui-4.11.1-py3-none-any.whl.metadata (2.4 kB)
Collecting flask-swagger==0.2.14 (from libretranslate)
Using cached flask-swagger-0.2.14.tar.gz (8.6 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Collecting flask==2.2.5 (from libretranslate)
Using cached Flask-2.2.5-py3-none-any.whl.metadata (3.9 kB)
Collecting itsdangerous==2.1.2 (from libretranslate)
Using cached itsdangerous-2.1.2-py3-none-any.whl.metadata (2.9 kB)
Collecting langdetect==1.0.9 (from libretranslate)
Using cached langdetect-1.0.9.tar.gz (981 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Collecting lexilang==1.0.1 (from libretranslate)
Using cached LexiLang-1.0.1-py3-none-any.whl.metadata (2.4 kB)
Collecting morfessor==2.0.6 (from libretranslate)
Using cached Morfessor-2.0.6-py3-none-any.whl.metadata (628 bytes)
Collecting packaging==23.1 (from libretranslate)
Using cached packaging-23.1-py3-none-any.whl.metadata (3.1 kB)
Collecting polib==1.1.1 (from libretranslate)
Using cached polib-1.1.1-py2.py3-none-any.whl.metadata (14 kB)
Collecting prometheus-client==0.15.0 (from libretranslate)
Using cached prometheus_client-0.15.0-py3-none-any.whl.metadata (22 kB)
Collecting redis==4.4.4 (from libretranslate)
Using cached redis-4.4.4-py3-none-any.whl.metadata (8.2 kB)
Collecting requests==2.31.0 (from libretranslate)
Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
INFO: pip is looking at multiple versions of libretranslate to determine which version is compatible with other requirements. This could take a while.
Collecting libretranslate
Using cached libretranslate-1.5.6-py3-none-any.whl.metadata (76 kB)
Using cached libretranslate-1.5.5-py3-none-any.whl.metadata (72 kB)
Using cached libretranslate-1.5.4-py3-none-any.whl.metadata (72 kB)
Using cached libretranslate-1.5.3-py3-none-any.whl.metadata (72 kB)
Collecting flask==2.2.2 (from libretranslate)
Using cached Flask-2.2.2-py3-none-any.whl.metadata (3.9 kB)
Collecting redis==4.3.4 (from libretranslate)
Using cached redis-4.3.4-py3-none-any.whl.metadata (53 kB)
Collecting requests==2.28.1 (from libretranslate)
Using cached requests-2.28.1-py3-none-any.whl.metadata (4.6 kB)
Collecting libretranslate
Using cached libretranslate-1.5.2-py3-none-any.whl.metadata (71 kB)
Using cached libretranslate-1.5.1-py3-none-any.whl.metadata (71 kB)
Collecting translatehtml==1.5.2 (from libretranslate)
Using cached translatehtml-1.5.2-py3-none-any.whl.metadata (888 bytes)
Collecting waitress==2.1.2 (from libretranslate)
Using cached waitress-2.1.2-py3-none-any.whl.metadata (7.0 kB)
Collecting werkzeug==2.2.2 (from libretranslate)
Using cached Werkzeug-2.2.2-py3-none-any.whl.metadata (4.4 kB)
Collecting setuptools>=0.7 (from apscheduler==3.9.1->libretranslate)
Using cached setuptools-69.5.1-py3-none-any.whl.metadata (6.2 kB)
Collecting six>=1.4.0 (from apscheduler==3.9.1->libretranslate)
Using cached six-1.16.0-py2.py3-none-any.whl.metadata (1.8 kB)
Collecting pytz (from apscheduler==3.9.1->libretranslate)
Using cached pytz-2024.1-py2.py3-none-any.whl.metadata (22 kB)
Collecting tzlocal!=3.*,>=2.0 (from apscheduler==3.9.1->libretranslate)
Using cached tzlocal-5.2-py3-none-any.whl.metadata (7.8 kB)
Collecting beautifulsoup4>=4.9.3 (from argos-translate-files==1.1.4->libretranslate)
Using cached 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)
Using cached lxml-5.2.1-cp312-cp312-win_amd64.whl.metadata (3.5 kB)
Collecting ctranslate2==3.20.0 (from argostranslate==1.9.1->libretranslate)
Using cached ctranslate2-3.20.0-cp312-cp312-win_amd64.whl.metadata (10 kB)
Collecting sentencepiece==0.1.99 (from argostranslate==1.9.1->libretranslate)
Using cached sentencepiece-0.1.99.tar.gz (2.6 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [31 lines of output]
Traceback (most recent call last):
File "C:\libretranslate\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\libretranslate\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\libretranslate\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\simon.eigeldinger\AppData\Local\Temp\pip-build-env-7xe8acfk\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\simon.eigeldinger\AppData\Local\Temp\pip-build-env-7xe8acfk\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "C:\Users\simon.eigeldinger\AppData\Local\Temp\pip-build-env-7xe8acfk\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
super().run_setup(setup_script=setup_script)
File "C:\Users\simon.eigeldinger\AppData\Local\Temp\pip-build-env-7xe8acfk\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
exec(code, locals())
File "", line 126, in
File "C:\Python312\Lib\subprocess.py", line 408, in check_call
retcode = call(*popenargs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\subprocess.py", line 389, in call
with Popen(*popenargs, **kwargs) as p:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\subprocess.py", line 1026, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Python312\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] Das System kann die angegebene Datei nicht finden
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

@pbanj
Copy link

pbanj commented May 9, 2024

i have the same issue

@grampy
Copy link

grampy commented May 14, 2024

had the same issue with Phython 3.12.3 but switching to Phyton 3.9.6 allows LibreTranslate to install correctly

@Spy345
Copy link

Spy345 commented May 16, 2024

have same issue

@Spy345
Copy link

Spy345 commented May 16, 2024

change the pyproject.toml:

"torch ==2.0.1" ==> "torch ==2.3.0"

By doing this above error ie resolved.

@leticiamn
Copy link

I had the same issue. With python 3.10.0 it works fine.

@rillywang
Copy link

rillywang commented May 29, 2024

https://github.com/LibreTranslate/LibreTranslate/blob/main/CONTRIBUTING.md, check the cmake is installed in your os or not.
This is not a bug. The erros means your os does not installed some needed exe file. you can add shell=true in subprocess.py at line 389(like this : with Popen(*popenargs, **kwargs,shell=True) as p: ) then run pip install libretranslate . it will prompt you that which exe file is not installed. you can download the exe file you needed then installed them. pip install libretranslate will run successfully.

@domasofan
Copy link
Author

Hi @rillywang,

Thanks for the information.
Will do that.

Greetings,
Simon

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

No branches or pull requests

6 participants