alphacep / vosk-api

Offline speech recognition API for Android, iOS, Raspberry Pi and servers with Python, Java, C# and Node
Apache License 2.0
7.38k stars 1.04k forks source link

"pip3 install vosk" on mac fails with "No matching distribution found for vosk" #1251

Closed jzohrab closed 7 months ago

jzohrab commented 1 year ago
(venv) MacBook-Air-2:minchat jeff$ python3 --version
Python 3.9.0
(venv) MacBook-Air-2:minchat jeff$ pip3 --version
pip 20.2.3 from /Users/jeff/Documents/Projects/minchat/venv/lib/python3.9/site-packages/pip (python 3.9)

Mac Big Sur, 11.6.7 (20G630)

A whole pile of info from $ pip3 install vosk -v:

click to expand Using pip 20.2.3 from /Users/jeff/Documents/Projects/minchat/venv/lib/python3.9/site-packages/pip (python 3.9) Non-user install because user site-packages disabled Created temporary directory: /private/var/folders/hl/rc8mnsq13tj57pj8_b8v4kk40000gn/T/pip-ephem-wheel-cache-mxlm_t1_ Created temporary directory: /private/var/folders/hl/rc8mnsq13tj57pj8_b8v4kk40000gn/T/pip-req-tracker-q668c7y5 Initialized build tracking at /private/var/folders/hl/rc8mnsq13tj57pj8_b8v4kk40000gn/T/pip-req-tracker-q668c7y5 Created build tracker: /private/var/folders/hl/rc8mnsq13tj57pj8_b8v4kk40000gn/T/pip-req-tracker-q668c7y5 Entered build tracker: /private/var/folders/hl/rc8mnsq13tj57pj8_b8v4kk40000gn/T/pip-req-tracker-q668c7y5 Created temporary directory: /private/var/folders/hl/rc8mnsq13tj57pj8_b8v4kk40000gn/T/pip-install-lu9oz3i_ 1 location(s) to search for versions of vosk: * https://pypi.org/simple/vosk/ Fetching project page and analyzing links: https://pypi.org/simple/vosk/ Getting page https://pypi.org/simple/vosk/ Found index url https://pypi.org/simple Looking up "https://pypi.org/simple/vosk/" in the cache Request header has "max_age" as 0, cache bypassed Starting new HTTPS connection (1): pypi.org:443 https://pypi.org:443 "GET /simple/vosk/ HTTP/1.1" 304 0 Skipping link: none of the wheel's tags match: cp34-cp34m-manylinux2010_x86_64: https://files.pythonhosted.org/packages/f8/87/16f70e6d04518377a02463b57644efe3b7f0fae328601079c9a7ac847739/vosk-0.3-cp34-cp34m-manylinux2010_x86_64.whl#sha256=9029063e4550862a71b3978311f24c367792857d5d2d8dfeec7a6a01c2c7ed68 (from https://pypi.org/simple/vosk/) (requires-python:>=3.5) Skipping link: none of the wheel's tags match: cp35-cp35m-manylinux2010_x86_64: https://files.pythonhosted.org/packages/5c/f5/e9cd1aa7cea7ea196cc4ddf3c2c34a9fe463a00d7ac75978f8093c8640d4/vosk-0.3-cp35-cp35m-manylinux2010_x86_64.whl#sha256=5bc1e981ba4704746e9850fb194d63f767ad4fcd861d8f3decb68a8eb0486815 (from https://pypi.org/simple/vosk/) (requires-python:>=3.5) Skipping link: none of the wheel's tags match: cp36-cp36m-manylinux2010_x86_64: https://files.pythonhosted.org/packages/6d/84/64f08ad906cc897362998b1ce7426d1d771eee6198edaf79a22f423f9806/vosk-0.3-cp36-cp36m-manylinux2010_x86_64.whl#sha256=e7b603b5945a89c9cf70c67091e5f6a20cec0045a6d8a85c1e89d0e5e49f918a (from https://pypi.org/simple/vosk/) (requires-python:>=3.5) ... Skipping link: none of the wheel's tags match: py3-none-win_amd64: https://files.pythonhosted.org/packages/e5/89/df5c3543e37df3b7d7bc726d8b9f871e786ed85bdf391065bde51d1f6a71/vosk-0.3.18-py3-none-win_amd64.whl#sha256=99f0f8574d6a2f90f765959866bf25c0c4c02e1965159775812ba8648149e455 (from https://pypi.org/simple/vosk/) (requires-python:>=3) Skipping link: none of the wheel's tags match: py3-none-linux_armv7l: https://files.pythonhosted.org/packages/64/f4/cb0f51c2c13c5729db48e6c74f123a19977c407988c519889b702e55dbcb/vosk-0.3.21-py3-none-linux_armv7l.whl#sha256=0a9a3b9dcfb9ce25c19f29cba878274a4b7db7d498155cdd566e5416085e81a2 (from https://pypi.org/simple/vosk/) (requires-python:>=3) Skipping link: none of the wheel's tags match: py3-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/d4/d8/5e04d2c0d5f4c67e4dcd592ae3e56ac9908782044c0829561f0eeedb25d3/vosk-0.3.21-py3-none-macosx_10_6_x86_64.whl#sha256=f91a78a662e677b96dabffd3fd15d46b45799587182e7c0a11fb3fa0ae1fdd6f (from https://pypi.org/simple/vosk/) (requires-python:>=3) Skipping link: none of the wheel's tags match: py3-none-manylinux2010_x86_64: https://files.pythonhosted.org/packages/27/da/b81a3f54f00ba0df2c5e1aa1b92a472e652a5cfdc4d230a448ee8cc7006b/vosk-0.3.21-py3-none-manylinux2010_x86_64.whl#sha256=7123be9f7580f8e5fe61e6f9afeda82e2bf5ed382d6a31fa76f05f9463b1109d (from https://pypi.org/simple/vosk/) (requires-python:>=3) Skipping link: none of the wheel's tags match: py3-none-win32: https://files.pythonhosted.org/packages/d9/d0/b98517da4750a9cddb17d1d7259c8f828076809b00811ddb1ceb0c6aae5f/vosk-0.3.21-py3-none-win32.whl#sha256=b1b1872f2924400a0f9275d2a535c7e9e7de6db75f27d3565ba4e1e9241d4aab (from https://pypi.org/simple/vosk/) (requires-python:>=3) Skipping link: none of the wheel's tags match: py3-none-win_amd64: https://files.pythonhosted.org/packages/fe/8d/39e485094e0fb0fef4855f3a6cfd99bbc459b1dad98971a5d0e4f47ce297/vosk-0.3.21-py3-none-win_amd64.whl#sha256=41587f1a6ade94aa9bb1680be3df3fa0d7b7572bd9122fad8dab63de97339808 (from https://pypi.org/simple/vosk/) (requires-python:>=3) ... Skipping link: none of the wheel's tags match: py3-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/78/69/38c06854882d03b904093062cfbd4c4448f1df8a872a4210a820e5c25b03/vosk-0.3.29-py3-none-macosx_10_6_x86_64.whl#sha256=7649ebd526925eb35972583bd8d9c633519d607883090e04ba714e845509a85c (from https://pypi.org/simple/vosk/) (requires-python:>=3) Skipping link: none of the wheel's tags match: py3-none-manylinux2010_x86_64, py3-none-manylinux_2_12_x86_64: https://files.pythonhosted.org/packages/de/16/6b8d9cfd2afc9d065d58e8ecf11eed472b190b995f7e9355b4acb2265256/vosk-0.3.29-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.whl#sha256=2c145f77491cdee03b1ebec8d83d52161bdc7d5e4e2a40c073431661f1d4e1a6 (from https://pypi.org/simple/vosk/) (requires-python:>=3) ... Skipping link: none of the wheel's tags match: py3-none-win_amd64: https://files.pythonhosted.org/packages/c0/4c/deb0861f7da9696f8a255f1731bb73e9412cca29c4b3888a3fcb2a930a59/vosk-0.3.45-py3-none-win_amd64.whl#sha256=6994ddc68556c7e5730c3b6f6bad13320e3519b13ce3ed2aa25a86724e7c10ac (from https://pypi.org/simple/vosk/) (requires-python:>=3) Given no hashes to check 0 links for project 'vosk': discarding no candidates ERROR: Could not find a version that satisfies the requirement vosk (from versions: none) ERROR: No matching distribution found for vosk Exception information: Traceback (most recent call last): File "/Users/jeff/Documents/Projects/minchat/venv/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 228, in _main status = self.run(options, args) File "/Users/jeff/Documents/Projects/minchat/venv/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper return func(self, options, args) File "/Users/jeff/Documents/Projects/minchat/venv/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 323, in run requirement_set = resolver.resolve( File "/Users/jeff/Documents/Projects/minchat/venv/lib/python3.9/site-packages/pip/_internal/resolution/legacy/resolver.py", line 183, in resolve discovered_reqs.extend(self._resolve_one(requirement_set, req)) File "/Users/jeff/Documents/Projects/minchat/venv/lib/python3.9/site-packages/pip/_internal/resolution/legacy/resolver.py", line 388, in _resolve_one abstract_dist = self._get_abstract_dist_for(req_to_install) File "/Users/jeff/Documents/Projects/minchat/venv/lib/python3.9/site-packages/pip/_internal/resolution/legacy/resolver.py", line 339, in _get_abstract_dist_for self._populate_link(req) File "/Users/jeff/Documents/Projects/minchat/venv/lib/python3.9/site-packages/pip/_internal/resolution/legacy/resolver.py", line 305, in _populate_link req.link = self._find_requirement_link(req) File "/Users/jeff/Documents/Projects/minchat/venv/lib/python3.9/site-packages/pip/_internal/resolution/legacy/resolver.py", line 270, in _find_requirement_link best_candidate = self.finder.find_requirement(req, upgrade) File "/Users/jeff/Documents/Projects/minchat/venv/lib/python3.9/site-packages/pip/_internal/index/package_finder.py", line 926, in find_requirement raise DistributionNotFound( pip._internal.exceptions.DistributionNotFound: No matching distribution found for vosk WARNING: You are using pip version 20.2.3; however, version 22.3.1 is available. You should consider upgrading via the '/Users/jeff/Documents/Projects/minchat/venv/bin/python3 -m pip install --upgrade pip' command. Removed build tracker: '/private/var/folders/hl/rc8mnsq13tj57pj8_b8v4kk40000gn/T/pip-req-tracker-q668c7y5'

with the error:

ERROR: Could not find a version that satisfies the requirement vosk (from versions: none)
ERROR: No matching distribution found for vosk
Exception information:
Traceback (most recent call last):
  File "/Users/jeff/Documents/Projects/minchat/venv/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 228, in _main
    status = self.run(options, args)
  File "/Users/jeff/Documents/Projects/minchat/venv/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper
    return func(self, options, args)
  File "/Users/jeff/Documents/Projects/minchat/venv/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 323, in run
    requirement_set = resolver.resolve(
  File "/Users/jeff/Documents/Projects/minchat/venv/lib/python3.9/site-packages/pip/_internal/resolution/legacy/resolver.py", line 183, in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set, req))
  File "/Users/jeff/Documents/Projects/minchat/venv/lib/python3.9/site-packages/pip/_internal/resolution/legacy/resolver.py", line 388, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/Users/jeff/Documents/Projects/minchat/venv/lib/python3.9/site-packages/pip/_internal/resolution/legacy/resolver.py", line 339, in _get_abstract_dist_for
    self._populate_link(req)
  File "/Users/jeff/Documents/Projects/minchat/venv/lib/python3.9/site-packages/pip/_internal/resolution/legacy/resolver.py", line 305, in _populate_link
    req.link = self._find_requirement_link(req)
  File "/Users/jeff/Documents/Projects/minchat/venv/lib/python3.9/site-packages/pip/_internal/resolution/legacy/resolver.py", line 270, in _find_requirement_link
    best_candidate = self.finder.find_requirement(req, upgrade)
  File "/Users/jeff/Documents/Projects/minchat/venv/lib/python3.9/site-packages/pip/_internal/index/package_finder.py", line 926, in find_requirement
    raise DistributionNotFound(
pip._internal.exceptions.DistributionNotFound: No matching distribution found for vosk

Cheers! jz

jzohrab commented 1 year ago

Per https://github.com/alphacep/vosk-api/issues/108, I tried pip3 install -U https://github.com/alphacep/vosk-api/releases/download/0.3.7/vosk-0.3.7-cp38-cp38-macosx_10_12_x86_64.whl but unfortunately it doesn't work on my platform.

Searching the releases, I found https://github.com/alphacep/vosk-api/releases/download/v0.3.42/vosk-osx-0.3.42.zip, but pip3 didn't like that:

$ pip3 install -U https://github.com/alphacep/vosk-api/releases/download/v0.3.42/vosk-osx-0.3.42.zip
Collecting https://github.com/alphacep/vosk-api/releases/download/v0.3.42/vosk-osx-0.3.42.zip
  Downloading https://github.com/alphacep/vosk-api/releases/download/v0.3.42/vosk-osx-0.3.42.zip (4.7 MB)
     |████████████████████████████████| 4.7 MB 1.4 MB/s 
    ERROR: Command errored out with exit status 1:
     command: /Users/jeff/Documents/Projects/minchat/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/hl/rc8mnsq13tj57pj8_b8v4kk40000gn/T/pip-req-build-yn8_kxk1/setup.py'"'"'; __file__='"'"'/private/var/folders/hl/rc8mnsq13tj57pj8_b8v4kk40000gn/T/pip-req-build-yn8_kxk1/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/hl/rc8mnsq13tj57pj8_b8v4kk40000gn/T/pip-pip-egg-info-8rm483xi
         cwd: /private/var/folders/hl/rc8mnsq13tj57pj8_b8v4kk40000gn/T/pip-req-build-yn8_kxk1/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tokenize.py", line 392, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/hl/rc8mnsq13tj57pj8_b8v4kk40000gn/T/pip-req-build-yn8_kxk1/setup.py'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
nshmyrev commented 1 year ago

Try

pip3 install -v https://github.com/alphacep/vosk-api/releases/download/v0.3.42/vosk-0.3.42-py3-none-macosx_10_6_universal2.whl

and provide full output

nshmyrev commented 1 year ago

I think you need to upgrade pip first

jzohrab commented 1 year ago

Thank you @nshmyrev for taking the time to respond. Upgrading pip3 and using the command you gave worked! Appreciated. Should I contribute some docs somewhere? If not, I'll close this issue. Cheers, jz

nshmyrev commented 7 months ago

Same as https://github.com/alphacep/vosk-api/issues/699