玩whisper语音识别的时候,在安装环境的时候又踩了不少坑,遇到不少问题:
whisper与Python版本如何对应?
如何查看本机Python环境列表?
多环境Python如何切换?
如何切换pip的默认环境?
PyTorch下载过慢如何解决?
该报错的解决方案:pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read timed out.
这里做个总结。
文章目录
问题一:Python环境版本与whisper匹配问题
原先用的环境是Python3.6,然后报各种错误,如:
ERROR: Could not find a version that satisfies the requirement tiktoken==0.3.1(from openai-whisper) (from versions: none)
ERROR: No matching distribution found for tiktoken==0.3.1
后面看到https://pypi.org/project/openai-whisper/网站上对whisper做的一些阐述。
发现:我们使用Python 3.9.9和PyTorch 1.10.1来训练和测试我们的模型,但代码库预计将与Python 3.8-3.10和最近的PyTorch版本兼容。