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

ERROR: ctranslate2==1.17.1 (from argostranslate) #153

Closed
zenny opened this issue Oct 12, 2021 · 14 comments
Closed

ERROR: ctranslate2==1.17.1 (from argostranslate) #153

zenny opened this issue Oct 12, 2021 · 14 comments

Comments

@zenny
Copy link

zenny commented Oct 12, 2021

Hi,

Installation fails.

Issues with ctranslate2==1.17.1

ERROR: Could not find a version that satisfies the requirement ctranslate2==1.17.1 (from argostranslate) (from versions: none)
ERROR: No matching distribution found for ctranslate2==1.17.1

Earlier, I got:

ERROR: Cannot install argostranslate==1.0, argostranslate==1.0.3, argostranslate==1.0.5, argostranslate==1.0.6, argostranslate==1.1.0, argostranslate==1.1.1, argostranslate==1.1.2, argostranslate==1.1.3, argostranslate==1.1.4, argostranslate==1.2.0, argostranslate==1.3.0, argostranslate==1.4.0, argostranslate==1.5.0, argostranslate==1.5.1 and argostranslate==1.5.2 because these package versions have conflicting dependencies.

The conflict is caused by:
    argostranslate 1.5.2 depends on ctranslate2==2.4.0
    argostranslate 1.5.1 depends on ctranslate2==2.1.0
    argostranslate 1.5.0 depends on ctranslate2==2.1.0
    argostranslate 1.4.0 depends on ctranslate2==1.20.1
    argostranslate 1.3.0 depends on ctranslate2==1.17.1
    argostranslate 1.2.0 depends on ctranslate2==1.17.1
    argostranslate 1.1.4 depends on ctranslate2==1.17.1
    argostranslate 1.1.3 depends on ctranslate2==1.17.1
    argostranslate 1.1.2 depends on ctranslate2==1.17.1
    argostranslate 1.1.1 depends on ctranslate2==1.17.1
    argostranslate 1.1.0 depends on ctranslate2==1.17.1
    argostranslate 1.0.6 depends on ctranslate2==1.17.1
    argostranslate 1.0.5 depends on ctranslate2==1.14.0
    argostranslate 1.0.3 depends on ctranslate2==1.14.0
    argostranslate 1.0 depends on ctranslate2

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

Already executed pip install --upgrade pip, yet no go! Tried also with pip install argostranslate==1.5.2 ctranslate2==2.4.0 libretranslate with same error. Any inputs?

@PJ-Finlay
Copy link
Contributor

Maybe try removing CTranslate2 then installing Argos Translate again? Not sure what went wrong.

pip uninstall ctranslate2
pip install argostranslate

@zenny
Copy link
Author

zenny commented Oct 13, 2021

Maybe try removing CTranslate2 then installing Argos Translate again? Not sure what went wrong.

pip uninstall ctranslate2
$ pip uninstall ctranslate2
WARNING: Skipping ctranslate2 as it is not installed.

pip install argostranslate

$ pip install argostranslate
Defaulting to user installation because normal site-packages is not writeable
Collecting argostranslate
  Using cached argostranslate-1.5.2-py3-none-any.whl (30 kB)
Requirement already satisfied: PyQt5==5.15.4 in /usr/lib/python3.10/site-packages (from argostranslate) (5.15.4)
  Using cached argostranslate-1.5.1-py3-none-any.whl (30 kB)
  Using cached argostranslate-1.5.0-py3-none-any.whl (29 kB)
  Using cached argostranslate-1.4.0-py3-none-any.whl (24 kB)
Collecting stanza==1.1.1
  Using cached stanza-1.1.1-py3-none-any.whl (227 kB)
Collecting sentencepiece==0.1.94
  Using cached sentencepiece-0.1.94.tar.gz (507 kB)
  Preparing metadata (setup.py) ... done
Collecting argostranslate
  Using cached argostranslate-1.3.0-py3-none-any.whl (19 kB)
  Using cached argostranslate-1.2.0-py3-none-any.whl (17 kB)
Collecting PyQt5==5.15.1
  Using cached PyQt5-5.15.1-5.15.1-cp35.cp36.cp37.cp38.cp39-abi3-manylinux2014_x86_64.whl (71.6 MB)
Collecting sphinx-rtd-theme==0.5.0
  Using cached sphinx_rtd_theme-0.5.0-py2.py3-none-any.whl (10.8 MB)
Collecting argostranslate
  Using cached argostranslate-1.1.4-py3-none-any.whl (15 kB)
  Using cached argostranslate-1.1.3-py3-none-any.whl (15 kB)
  Using cached argostranslate-1.1.2-py3-none-any.whl (15 kB)
  Using cached argostranslate-1.1.1-py3-none-any.whl (15 kB)
  Using cached argostranslate-1.1.0-py3-none-any.whl (15 kB)
  Using cached argostranslate-1.0.6-py3-none-any.whl (14 kB)
  Using cached argostranslate-1.0.5-py3-none-any.whl (13 kB)
Collecting sentencepiece==0.1.91
  Using cached sentencepiece-0.1.91.tar.gz (500 kB)
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-69lcp7co/sentencepiece_36b9aaa1070646fb89268e7bd4ae3c3c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-69lcp7co/sentencepiece_36b9aaa1070646fb89268e7bd4ae3c3c/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-y5s3gh2l
       cwd: /tmp/pip-install-69lcp7co/sentencepiece_36b9aaa1070646fb89268e7bd4ae3c3c/
  Complete output (5 lines):
  Package sentencepiece was not found in the pkg-config search path.
  Perhaps you should add the directory containing `sentencepiece.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'sentencepiece' found
  Failed to find sentencepiece pkgconfig
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/ba/f6/520b56e5977f62aee48833da8b4ff2fdc2b10ebfa0dd78556b1d707d4086/sentencepiece-0.1.91.tar.gz#sha256=f9700cf607ea064d9fad34c751fbf49953dcc56fe68c54b277481aa0aec5c18f (from https://pypi.org/simple/sentencepiece/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Collecting argostranslate
  Using cached argostranslate-1.0.3-py3-none-any.whl (12 kB)
  Using cached argostranslate-1.0-py3-none-any.whl (12 kB)
Collecting sphinx-rtd-theme
  Using cached sphinx_rtd_theme-1.0.0-py2.py3-none-any.whl (2.8 MB)
Collecting sphinx==3.2.1
  Using cached Sphinx-3.2.1-py3-none-any.whl (2.9 MB)
ERROR: Cannot install argostranslate==1.0, argostranslate==1.0.3, argostranslate==1.0.5, argostranslate==1.0.6, argostranslate==1.1.0, argostranslate==1.1.1, argostranslate==1.1.2, argostranslate==1.1.3, argostranslate==1.1.4, argostranslate==1.2.0, argostranslate==1.3.0, argostranslate==1.4.0, argostranslate==1.5.0, argostranslate==1.5.1 and argostranslate==1.5.2 because these package versions have conflicting dependencies.

The conflict is caused by:
    argostranslate 1.5.2 depends on ctranslate2==2.4.0
    argostranslate 1.5.1 depends on ctranslate2==2.1.0
    argostranslate 1.5.0 depends on ctranslate2==2.1.0
    argostranslate 1.4.0 depends on ctranslate2==1.20.1
    argostranslate 1.3.0 depends on ctranslate2==1.17.1
    argostranslate 1.2.0 depends on ctranslate2==1.17.1
    argostranslate 1.1.4 depends on ctranslate2==1.17.1
    argostranslate 1.1.3 depends on ctranslate2==1.17.1
    argostranslate 1.1.2 depends on ctranslate2==1.17.1
    argostranslate 1.1.1 depends on ctranslate2==1.17.1
    argostranslate 1.1.0 depends on ctranslate2==1.17.1
    argostranslate 1.0.6 depends on ctranslate2==1.17.1
    argostranslate 1.0.5 depends on sentencepiece==0.1.91
    argostranslate 1.0.3 depends on sentencepiece==0.1.91
    argostranslate 1.0 depends on ctranslate2

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

Same as earlier. :(

Even tried to install requirements by pulling the master git repo:

$ pip install -r requirements.txt --user
Collecting argostranslate==1.5.2
  Using cached argostranslate-1.5.2-py3-none-any.whl (30 kB)
Collecting Flask==1.1.2
  Using cached Flask-1.1.2-py2.py3-none-any.whl (94 kB)
Collecting flask-swagger==0.2.14
  Using cached flask-swagger-0.2.14.tar.gz (8.6 kB)
  Preparing metadata (setup.py) ... done
Collecting flask-swagger-ui==3.36.0
  Using cached flask-swagger-ui-3.36.0.tar.gz (4.9 MB)
  Preparing metadata (setup.py) ... done
Collecting Flask-Limiter==1.4
  Using cached Flask_Limiter-1.4-py3-none-any.whl (15 kB)
Collecting waitress==1.4.4
  Using cached waitress-1.4.4-py2.py3-none-any.whl (58 kB)
Collecting expiringdict==1.2.1
  Using cached expiringdict-1.2.1.tar.gz (8.1 kB)
  Preparing metadata (setup.py) ... done
Collecting pyicu==2.7
  Using cached PyICU-2.7.tar.gz (189 kB)
  Preparing metadata (setup.py) ... done
Collecting pycld2==0.41
  Using cached pycld2-0.41.tar.gz (41.4 MB)
  Preparing metadata (setup.py) ... done
Collecting morfessor==2.0.6
  Using cached Morfessor-2.0.6-py3-none-any.whl (35 kB)
Collecting polyglot==16.7.4
  Using cached polyglot-16.7.4.tar.gz (126 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: appdirs==1.4.4 in /usr/lib/python3.10/site-packages (from -r requirements.txt (line 12)) (1.4.4)
Collecting APScheduler==3.7.0
  Using cached APScheduler-3.7.0-py2.py3-none-any.whl (59 kB)
Collecting translatehtml==1.5.1
  Using cached translatehtml-1.5.1-py3-none-any.whl (3.2 kB)
Collecting stanza==1.1.1
  Using cached stanza-1.1.1-py3-none-any.whl (227 kB)
ERROR: Could not find a version that satisfies the requirement ctranslate2==2.4.0 (from argostranslate) (from versions: none)
ERROR: No matching distribution found for ctranslate2==2.4.0

Seems like upstream issue?! Hmmm

@PJ-Finlay
Copy link
Contributor

What platform are you on? I'm able to install CTranslate2 2.4.0

@zenny
Copy link
Author

zenny commented Oct 13, 2021

What platform are you on? I'm able to install CTranslate2 2.4.0

VoidLinux (rolling release) kernel v 5.4.150

@PJ-Finlay
Copy link
Contributor

Hmm, not sure. Maybe something with your Python installation or CTranlate2 not supporting Void Linux?

@guillaumekln
Copy link

Void Linux uses the musl libc, but the CTranslate2 Python package requires a Linux system with glibc instead. Most Python extensions compiled from C/C++ have the same requirement.

@zenny
Copy link
Author

zenny commented Nov 7, 2021

Void Linux uses the musl libc, but the CTranslate2 Python package requires a Linux system with glibc instead. Most Python extensions compiled from C/C++ have the same requirement.

I am on glibc based voidlinux, fyi.

[*] glibc-2.32_2                             GNU C library
[*] glibc-devel-2.32_2                       GNU C library - development files
[*] glibc-locales-2.32_2                     GNU C library - locale data files

@PJ-Finlay
Copy link
Contributor

Maybe it's an issue with SentencePiece?

Collecting sentencepiece==0.1.91
  Using cached sentencepiece-0.1.91.tar.gz (500 kB)
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-69lcp7co/sentencepiece_36b9aaa1070646fb89268e7bd4ae3c3c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-69lcp7co/sentencepiece_36b9aaa1070646fb89268e7bd4ae3c3c/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-y5s3gh2l
       cwd: /tmp/pip-install-69lcp7co/sentencepiece_36b9aaa1070646fb89268e7bd4ae3c3c/
  Complete output (5 lines):
  Package sentencepiece was not found in the pkg-config search path.
  Perhaps you should add the directory containing `sentencepiece.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'sentencepiece' found
  Failed to find sentencepiece pkgconfig

You could try installing just SentencePiece first in a fresh virtual environment.

@pierotofy
Copy link
Member

Closing, assuming this has been fixed. Feel free to reopen if the issue persists 🙏

@zenny
Copy link
Author

zenny commented Jan 1, 2023

Closing, assuming this has been fixed. Feel free to reopen if the issue persists pray

@pierotofy Not yet fixed.

Tried to install using pip3, still getting:

ERROR: Could not find a version that satisfies the requirement ctranslate2==1.17.1 (from argostranslate) (from versions: 2.23.0, 2.24.0, 3.0.0, 3.0.1, 3.0.2, 3.1.0, 3.2.0)
ERROR: No matching distribution found for ctranslate2==1.17.1

Checked SentencePiece as @PJ-Finlay recommened and already installed.

$ pip3 install sentencepiece
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: sentencepiece in /home/zenny/.local/lib/python3.11/site-packages (0.1.96)

Any idea?

@PJ-Finlay
Copy link
Contributor

You may need to install pkg-config:

sudo apt-get install pkg-config

@zenny
Copy link
Author

zenny commented Jan 2, 2023

You may need to install pkg-config:

sudo apt-get install pkg-config

I checked in voidlinux about pkg-config and it is already installed:

# xbps-query -v -Rs pkg-config)
[*] perl-ExtUtils-PkgConfig-1.16_3 Simplistic perl interface to pkg-config
[*] pkg-config-0.29.2_3            System for managing library compile/link flags

Do you mean pip3 install pkgconfig?

Installed pip3 install pkgconfig too, yet I end up with:

ERROR: Could not find a version that satisfies the requirement ctranslate2==1.17.1 (from argostranslate) (from versions: 2.23.0, 2.24.0, 3.0.0, 3.0.1, 3.0.2, 3.1.0, 3.2.0,
3.3.0)

Cheers,

/z

@PJ-Finlay
Copy link
Contributor

What version of LibreTranslate are you trying to install? It looks like it's trying to use ctranslate2==1.17.1 but CTranslate2 should be version 2 or higher.

https://github.com/argosopentech/argos-translate/blob/000aecda6fc927250a1b477186aae5812fd827d0/requirements.txt#L1

@zenny
Copy link
Author

zenny commented Jan 3, 2023

What version of LibreTranslate are you trying to install? It looks like it's trying to use ctranslate2==1.17.1 but CTranslate2 should be version 2 or higher.

https://github.com/argosopentech/argos-translate/blob/000aecda6fc927250a1b477186aae5812fd827d0/requirements.txt#L1

The version of CTranslate2=2.24.0 referred in that requirements.txt:

$ pip3 install ctranslate2==2.24.0
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: ctranslate2==2.24.0 in /home/zenny/.local/lib/python3.11/site-packages (2.24.0)
Requirement already satisfied: numpy in /usr/lib/python3.11/site-packages (from ctranslate2==2.24.0) (1.24.1)
Requirement already satisfied: pyyaml<7,>=5.3 in /usr/lib/python3.11/site-packages (from ctranslate2==2.24.0) (6.0)

I am using pip3, so it has to fix dependencies on its own, isn't it? Just wondering!

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

4 participants