Fay 数字人部署环境需求
D:\ai\Fay>python main.py
pygame 2.6.1 (SDL 2.28.4, Python 3.11.9)
Hello from the pygame community. https://www.pygame.org/contribute.html
[2025-04-11 00:10:16.7][系统] 注册命令...
[2025-04-11 00:10:16.8][系统] restart 重启服务
[2025-04-11 00:10:16.8][系统] start 启动服务
[2025-04-11 00:10:16.8][系统] stop 关闭服务
[2025-04-11 00:10:16.8][系统] exit 结束程序
[2025-04-11 00:10:16.8][系统] 使用 'help' 获取帮助.
[2025-04-11 00:10:16.8][系统] 请通过浏览器访问 http://127.0.0.1:5000/ 管理您的Fay
[2025-04-11 00:10:35.7][系统] websocket连接上:10003
Traceback (most recent call last): File "<string>", line 2, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "G:\C盘临时缓存\Temp\pip-install-5k942ak3\azure_3309fe0d42fd4586a3be8b84146d4d45\setup.py", line 60, in <module> raise RuntimeError(message) RuntimeError: Starting with v5.0.0, the 'azure' meta-package is deprecated and cannot be installed anymore. Please install the service specific packages prefixed by `azure` needed for your application. The complete list of available packages can be found at: Azure SDK for Python (All) | Azure SDKs Here's a non-exhaustive list of common packages: - azure-mgmt-compute (azure-mgmt-compute · PyPI) : Management of Virtual Machines, etc. - azure-mgmt-storage (azure-mgmt-storage · PyPI) : Management of storage accounts. - azure-mgmt-resource (azure-mgmt-resource · PyPI) : Generic package about Azure Resource Management (ARM) - azure-keyvault-secrets (azure-keyvault-secrets · PyPI) : Access to secrets in Key Vault - azure-storage-blob (azure-storage-blob · PyPI) : Access to blobs in storage accounts A more comprehensive discussion of the rationale for this decision can be found in the following issue:
这个错误提示表明从版本 5.0.0 开始,azure
元包已被弃用,无法再安装。你需要安装应用程序所需的、以 azure
为前缀的特定服务包。
解决方案
若你原本打算安装 azure
元包,要根据自己的应用需求,选择安装具体的服务包。下面是安装示例,假设你需要安装 azure-mgmt-compute
包:
bash
pip install azure-mgmt-compute
你可以按照上述方式,依据自己的实际需求,安装其他特定服务包。下面是常见服务包的安装命令示例:
- 安装
azure-mgmt-storage
包:
bash
pip install azure-mgmt-storage
- 安装
azure-mgmt-resource
包:
bash
pip install azure-mgmt-resource
- 安装
azure-keyvault-secrets
包:
bash
pip install azure-keyvault-secrets
- 安装
azure-storage-blob
包:
bash
pip install azure-storage-blob
若要查看完整的可用包列表,可访问 Azure SDK for Python (All) | Azure SDKs。
:\ai\Fay>python main.py pygame 2.6.1 (SDL 2.28.4, Python 3.11.9) Hello from the pygame community. Contribute - pygame wiki Traceback (most recent call last): File "D:\ai\Fay\main.py", line 12, in <module> from gui import flask_server File "D:\ai\Fay\gui\flask_server.py", line 15, in <module> import fay_booter File "D:\ai\Fay\fay_booter.py", line 11, in <module> from core.recorder import Recorder File "D:\ai\Fay\core\recorder.py", line 18, in <module> from core import fay_core File "D:\ai\Fay\core\fay_core.py", line 50, in <module> from tts.ms_tts_sdk import Speech File "D:\ai\Fay\tts\ms_tts_sdk.py", line 3, in <module> import azure.cognitiveservices.speech as speechsdk ModuleNotFoundError: No module named 'azure.cognitiveservices
从你给出的错误信息可知,Python 解释器找不到 azure.cognitiveservices
模块,这往往是因为该模块没有被安装。azure.cognitiveservices
是 Azure 认知服务的 Python SDK 里的一部分,你得安装它才能正常使用。
解决方案
你可以借助 pip
来安装 azure-cognitiveservices-speech
包,在命令行里运行以下命令:
bash
pip install azure-cognitiveservices-speech
详细步骤
- 打开命令行工具:在 Windows 系统中,你可以通过按下
Win + R
组合键,输入cmd
并回车来打开命令提示符;在 macOS 或者 Linux 系统中,你可以打开终端应用程序。 - 运行安装命令:在命令行中输入上述
pip
命令,然后回车执行。 - 验证安装:安装完成之后,再次运行你的 Python 脚本:
bash
python main.py
注意事项
- 要保证你使用的
pip
版本和当前 Python 环境是匹配的。如果你使用了虚拟环境,要先激活虚拟环境再进行安装。 - 若你在安装过程中碰到网络问题,可考虑使用国内的镜像源,例如:
bash
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple azure-cognitiveservices-speech
按照上述步骤操作,你应该就能解决 ModuleNotFoundError
问题了。
:\ai\Fay>python main.py pygame 2.6.1 (SDL 2.28.4, Python 3.11.9) Hello from the pygame community. Contribute - pygame wiki Traceback (most recent call last): File "D:\ai\Fay\main.py", line 13, in <module> from gui.window import MainWindow File "D:\ai\Fay\gui\window.py", line 5, in <module> from PyQt5.QtWidgets import * ModuleNotFoundError: No module named 'PyQt5.QtWidgets'
这个错误表明你的 Python 环境中缺少 PyQt5
库,PyQt5.QtWidgets
是 PyQt5
库中的一个模块,所以找不到该模块意味着 PyQt5
没有被正确安装。
解决方案
你可以使用 pip
来安装 PyQt5
,在命令行中执行以下命令:
bash
pip install PyQt5
详细步骤
- 打开命令行工具:
- 在 Windows 系统中,按下
Win + R
组合键,输入cmd
并回车,打开命令提示符。 - 在 macOS 或 Linux 系统中,打开终端应用程序。
- 在 Windows 系统中,按下
- 运行安装命令:在命令行中输入上述
pip
命令并回车执行。 - 验证安装:安装完成后,再次运行你的 Python 脚本:
bash
python main.py
注意事项
- 确保你使用的
pip
版本与当前 Python 环境匹配。如果使用了虚拟环境,需要先激活虚拟环境再进行安装。 - 如果在安装过程中遇到网络问题,可以考虑使用国内的镜像源,例如:
bash
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple PyQt5
按照上述步骤操作,应该可以解决 ModuleNotFoundError
问题。
D:\ai\Fay>python main.py pygame 2.6.1 (SDL 2.28.4, Python 3.11.9) Hello from the pygame community. Contribute - pygame wiki Traceback (most recent call last): File "D:\ai\Fay\main.py", line 13, in <module> from gui.window import MainWindow File "D:\ai\Fay\gui\window.py", line 8, in <module> from PyQt5.QtWebEngineWidgets import * ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidgets'
这个错误提示显示,Python 解释器未能找到 PyQt5.QtWebEngineWidgets
模块,这通常是因为 PyQtWebEngine
这个 PyQt5
的扩展模块没有安装。PyQtWebEngine
提供了用于在 PyQt5 应用程序中嵌入 Web 内容的功能。
解决方案
你可以使用 pip
来安装 PyQtWebEngine
包,在命令行里运行以下命令:
bash
pip install PyQtWebEngine
详细步骤
- 开启命令行工具:
- 在 Windows 系统中,按下
Win + R
组合键,输入cmd
并回车,以此打开命令提示符。 - 在 macOS 或者 Linux 系统中,打开终端应用程序。
- 在 Windows 系统中,按下
- 执行安装命令:在命令行中输入上述
pip
命令,然后回车执行。 - 验证安装:安装完成之后,再次运行你的 Python 脚本:
bash
python main.py
注意事项
- 要保证你使用的
pip
版本和当前 Python 环境是匹配的。如果你使用了虚拟环境,要先激活虚拟环境再进行安装。 - 若你在安装过程中碰到网络问题,可考虑使用国内的镜像源,例如:
bash
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple PyQtWebEngine
按照上述步骤操作,你应该就能解决 ModuleNotFoundError
问题了。