mli / autocut

用文本编辑器剪视频
Apache License 2.0
6.6k stars 659 forks source link

安装时报Wisper版本未找到 #85

Closed BillZong closed 1 year ago

BillZong commented 1 year ago

问题

执行安装包时,报错:

Could not find a version that satisfies the requirement whisper (unavailable)

环境

python --version
Python 3.10.9

pyenv virtualenvs
* autocut (created from /usr/local/opt/python@3.10)

pip --version
pip 23.0.1 from /Users/bill/.pyenv/versions/autocut/lib/python3.10/site-packages/pip (python 3.10)

日志

pip install git+https://github.com/mli/autocut.git

Collecting git+https://github.com/mli/autocut.git
  Cloning https://github.com/mli/autocut.git to /private/var/folders/tl/0j31hfyx2dx8bq98y4dg13840000gn/T/pip-req-build-tcrjarry
  Running command git clone --filter=blob:none --quiet https://github.com/mli/autocut.git /private/var/folders/tl/0j31hfyx2dx8bq98y4dg13840000gn/T/pip-req-build-tcrjarry
  Resolved https://github.com/mli/autocut.git to commit f66a6c029e2f4fc68064cc6bac6b21ebb976b25c
  Preparing metadata (setup.py) ... done
Collecting whisper@ git+https://github.com/openai/whisper.git
  Cloning https://github.com/openai/whisper.git to /private/var/folders/tl/0j31hfyx2dx8bq98y4dg13840000gn/T/pip-install-jym9v5cv/whisper_0764ff5560b7448d8e19f6fda1e34630
  Running command git clone --filter=blob:none --quiet https://github.com/openai/whisper.git /private/var/folders/tl/0j31hfyx2dx8bq98y4dg13840000gn/T/pip-install-jym9v5cv/whisper_0764ff5560b7448d8e19f6fda1e34630
  Resolved https://github.com/openai/whisper.git to commit b5851c6c40e753606765ac45b85b298e3ae9e00d
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
  WARNING: Generating metadata for package whisper produced metadata for project name openai-whisper. Fix your #egg=whisper fragments.
Discarding git+https://github.com/openai/whisper.git: Requested openai-whisper from git+https://github.com/openai/whisper.git (from autocut==0.0.3) has inconsistent name: expected 'whisper', but metadata has 'openai-whisper'
Collecting srt
  Using cached srt-3.5.3.tar.gz (28 kB)
  Preparing metadata (setup.py) ... done
Collecting moviepy
  Using cached moviepy-1.0.3.tar.gz (388 kB)
  Preparing metadata (setup.py) ... done
Collecting opencc-python-reimplemented
  Using cached opencc_python_reimplemented-0.1.7-py2.py3-none-any.whl (481 kB)
Collecting torchaudio
  Using cached torchaudio-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl (3.9 MB)
Collecting parameterized
  Using cached parameterized-0.9.0-py2.py3-none-any.whl (20 kB)
ERROR: Could not find a version that satisfies the requirement whisper (unavailable) (from autocut) (from versions: 0.9.5, 0.9.6, 0.9.7, 0.9.8, 0.9.9, 0.9.10, 0.9.11, 0.9.12, 0.9.13, 0.9.14, 0.9.15, 0.9.16, 1.0.0, 1.0.1, 1.0.2, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.1.9, 1.1.10)
ERROR: No matching distribution found for whisper (unavailable)

建议

解决版本依赖缺陷

crazy198917 commented 1 year ago

同样的问题

mrLuyao commented 1 year ago

用 pip install -U openai-whisper 安装whisper

BillZong commented 1 year ago

用 pip install -U openai-whisper 安装whisper

谢谢回复。openai-whisper 安装上了。但是安装 autocut 的时候,依然还是报警告和错误:

Building wheels for collected packages: openai-whisper
  Building wheel for openai-whisper (pyproject.toml) ... done
  Created wheel for openai-whisper: filename=openai_whisper-20230314-py3-none-any.whl size=796901 sha256=b77cb82deae181a9329c3554c143e1e6973e32ff9f8af4f3f85660ee6cbdab9d
  Stored in directory: /Users/bill/Library/Caches/pip/wheels/b2/13/5f/fe8245f6dc59df505879da4b2129932e342f02a80e6b87f27d
Successfully built openai-whisper
Installing collected packages: mpmath, urllib3, typing-extensions, tqdm, sympy, regex, numpy, networkx, more-itertools, MarkupSafe, llvmlite, idna, future, filelock, charset-normalizer, certifi, requests, numba, jinja2, ffmpeg-python, torch, tiktoken, openai-whisper
  DEPRECATION: future is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for future ... done
Successfully installed MarkupSafe-2.1.2 certifi-2022.12.7 charset-normalizer-3.1.0 ffmpeg-python-0.2.0 filelock-3.10.7 future-0.18.3 idna-3.4 jinja2-3.1.2 llvmlite-0.39.1 more-itertools-9.1.0 mpmath-1.3.0 networkx-3.0 numba-0.56.4 numpy-1.23.5 openai-whisper-20230314 regex-2023.3.23 requests-2.28.2 sympy-1.11.1 tiktoken-0.3.1 torch-2.0.0 tqdm-4.65.0 typing-extensions-4.5.0 urllib3-1.26.15

$ pip install -U git+https://github.com/mli/autocut.git

  WARNING: Generating metadata for package whisper produced metadata for project name openai-whisper. Fix your #egg=whisper fragments.
Discarding git+https://github.com/openai/whisper.git: Requested openai-whisper from git+https://github.com/openai/whisper.git (from autocut==0.0.3) has inconsistent name: expected 'whisper', but metadata has 'openai-whisper'
ERROR: Could not find a version that satisfies the requirement whisper (unavailable) (from autocut) (from versions: 0.9.5, 0.9.6, 0.9.7, 0.9.8, 0.9.9, 0.9.10, 0.9.11, 0.9.12, 0.9.13, 0.9.14, 0.9.15, 0.9.16, 1.0.0, 1.0.1, 1.0.2, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.1.9, 1.1.10)
ERROR: No matching distribution found for whisper (unavailable)
mrLuyao commented 1 year ago

用 pip install -U openai-whisper 安装whisper

谢谢回复。openai-whisper 安装上了。但是安装 autocut 的时候,依然还是报警告和错误:

Building wheels for collected packages: openai-whisper
  Building wheel for openai-whisper (pyproject.toml) ... done
  Created wheel for openai-whisper: filename=openai_whisper-20230314-py3-none-any.whl size=796901 sha256=b77cb82deae181a9329c3554c143e1e6973e32ff9f8af4f3f85660ee6cbdab9d
  Stored in directory: /Users/bill/Library/Caches/pip/wheels/b2/13/5f/fe8245f6dc59df505879da4b2129932e342f02a80e6b87f27d
Successfully built openai-whisper
Installing collected packages: mpmath, urllib3, typing-extensions, tqdm, sympy, regex, numpy, networkx, more-itertools, MarkupSafe, llvmlite, idna, future, filelock, charset-normalizer, certifi, requests, numba, jinja2, ffmpeg-python, torch, tiktoken, openai-whisper
  DEPRECATION: future is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for future ... done
Successfully installed MarkupSafe-2.1.2 certifi-2022.12.7 charset-normalizer-3.1.0 ffmpeg-python-0.2.0 filelock-3.10.7 future-0.18.3 idna-3.4 jinja2-3.1.2 llvmlite-0.39.1 more-itertools-9.1.0 mpmath-1.3.0 networkx-3.0 numba-0.56.4 numpy-1.23.5 openai-whisper-20230314 regex-2023.3.23 requests-2.28.2 sympy-1.11.1 tiktoken-0.3.1 torch-2.0.0 tqdm-4.65.0 typing-extensions-4.5.0 urllib3-1.26.15

$ pip install -U git+https://github.com/mli/autocut.git

  WARNING: Generating metadata for package whisper produced metadata for project name openai-whisper. Fix your #egg=whisper fragments.
Discarding git+https://github.com/openai/whisper.git: Requested openai-whisper from git+https://github.com/openai/whisper.git (from autocut==0.0.3) has inconsistent name: expected 'whisper', but metadata has 'openai-whisper'
ERROR: Could not find a version that satisfies the requirement whisper (unavailable) (from autocut) (from versions: 0.9.5, 0.9.6, 0.9.7, 0.9.8, 0.9.9, 0.9.10, 0.9.11, 0.9.12, 0.9.13, 0.9.14, 0.9.15, 0.9.16, 1.0.0, 1.0.1, 1.0.2, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.1.9, 1.1.10)
ERROR: No matching distribution found for whisper (unavailable)

这是因为setup.py里有这么一句:"whisper @ git+https://github.com/openai/whisper.git", 整句删掉就不会报错了doge (现在已经可以通过pip直接安装了,所以删掉” @ git+https://github.com/openai/whisper.git“应该也能跑通。 用 pip install -U openai-whisper 安装 whisper 之后,应该就可以用了。

BillZong commented 1 year ago

谢谢指正。 估计仓库需要做一个 PR 补丁,顺便修正下 README 文档。 @mrLuyao 大佬方便提下么?

chenqianhe commented 1 year ago

fixed