Ikaros-521 / AI-Vtuber

AI Vtuber是一个由 【ChatterBot/ChatGPT/claude/langchain/chatglm/text-gen-webui/闻达/千问/kimi/ollama】 驱动的虚拟主播【Live2D/UE/xuniren】,可以在 【Bilibili/抖音/快手/微信视频号/拼多多/斗鱼/YouTube/twitch/TikTok】 直播中与观众实时互动 或 直接在本地进行聊天。它使用TTS技术【edge-tts/VITS/elevenlabs/bark/bert-vits2/睿声】生成回答并可以选择【so-vits-svc/DDSP-SVC】变声;指令协同SD画图。
https://ikaros-521.github.io/Luna-Docs/site/
GNU General Public License v3.0
2.55k stars 396 forks source link

🙋 Mac部署问题讨论 #423

Open Ikaros-521 opened 8 months ago

Ikaros-521 commented 8 months ago

专用讨论帖

Ikaros-521 commented 8 months ago

pyaudio安装失败,先brew install portaudio,再安装pyaudio

pyqt5手动安装一下,走清华源

pyqt5-tools 安装失败,跳过,不影响使用

brew install ffmpeg安装

同样手动安装 blivedm

pip install pure_protobuf==3.0.0a5

Ikaros-521 commented 8 months ago

pyvirtualcam 不支持Mac,需要屏蔽SD相关的功能

Ikaros-521 commented 8 months ago
Traceback (most recent call last):
  File "/Users/fameidetuoyanghetanghesuan/Desktop/AI-Vtuber/main.py", line 9, in <module>
    from PyQt5.QtWidgets import QApplication, QMainWindow, QMessageBox, QLabel, QComboBox, QLineEdit, QTextEdit, QCheckBox, QGroupBox
ImportError: dlopen(/Users/fameidetuoyanghetanghesuan/opt/miniconda3/envs/aivtb/lib/python3.10/site-packages/PyQt5/QtWidgets.abi3.so, 0x0002): Symbol not found: __ZTVNSt3__13pmr25monotonic_buffer_resourceE
  Referenced from: <8239A761-D3BE-396C-A445-F703655273B5> /Users/fameidetuoyanghetanghesuan/opt/miniconda3/envs/aivtb/lib/python3.10/site-packages/PyQt5/Qt5/lib/QtWidgets.framework/Versions/5/QtWidgets
  Expected in:     <3EE92404-8FC3-374B-A598-D5C9A8CD64B5> /usr/lib/libc++.1.dylib

暂时无法解决,放弃pyqt5

Ikaros-521 commented 8 months ago
2023-11-11 21:01:01,653 - /Users/1/opt/miniconda3/envs/aivtb/lib/python3.10/site-packages/nicegui/app/app.py[line:118] - ERROR: [Errno 2] No such file or directory: 'data\\edge-tts-voice-list.txt'
Traceback (most recent call last):
  File "/Users/1/opt/miniconda3/envs/aivtb/lib/python3.10/site-packages/nicegui/events.py", line 401, in handle_event
    result = handler(arguments) if expects_arguments else handler()
  File "/Users/1/Desktop/AI-Vtuber/webui.py", line 1776, in <lambda>
    button_login = ui.button('登录', on_click=lambda: my_login()).style("width:250px;")
  File "/Users/1/Desktop/AI-Vtuber/webui.py", line 1760, in my_login
    goto_func_page()
  File "/Users/1/Desktop/AI-Vtuber/webui.py", line 1299, in goto_func_page
    with open('data\edge-tts-voice-list.txt', 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'data\\edge-tts-voice-list.txt'

路径语法改为 /

Ikaros-521 commented 8 months ago
Traceback (most recent call last):
  File "/Users/fameidetuoyanghetanghesuan/Desktop/AI-Vtuber/bilibili2.py", line 16, in <module>
    import blivedm
  File "/Users/fameidetuoyanghetanghesuan/opt/miniconda3/envs/aivtb/lib/python3.10/site-packages/blivedm/__init__.py", line 2, in <module>
    from .handlers import *
  File "/Users/fameidetuoyanghetanghesuan/opt/miniconda3/envs/aivtb/lib/python3.10/site-packages/blivedm/handlers.py", line 5, in <module>
    from .clients import ws_base
  File "/Users/fameidetuoyanghetanghesuan/opt/miniconda3/envs/aivtb/lib/python3.10/site-packages/blivedm/clients/__init__.py", line 2, in <module>
    from .web import *
  File "/Users/fameidetuoyanghetanghesuan/opt/miniconda3/envs/aivtb/lib/python3.10/site-packages/blivedm/clients/web.py", line 9, in <module>
    from . import ws_base
  File "/Users/fameidetuoyanghetanghesuan/opt/miniconda3/envs/aivtb/lib/python3.10/site-packages/blivedm/clients/ws_base.py", line 11, in <module>
    import brotli
ModuleNotFoundError: No module named 'brotli'

pip install brotli

Ikaros-521 commented 8 months ago

虚拟声卡 VB-audio不支持Mac 改用 brew install blackhole-16ch https://github.com/ExistentialAudio/BlackHole

Ikaros-521 commented 8 months ago

运行后退出仍然存在端口占用,进程挂在后台问题,请kill掉相关进程后重启

zachry-r commented 8 months ago

D5C9A8CD64B5

brew 去安装PyQt@5,安装完将sit包里面的 PyQt@5 相关拷贝到 python包里面的sit包里面

Ikaros-521 commented 8 months ago

D5C9A8CD64B5

brew 去安装PyQt@5,安装完将sit包里面的 PyQt@5 相关拷贝到 python包里面的sit包里面 ()_3TW8J$WO~62{ 3VROL A

AeroXi commented 7 months ago

pyvirtualcam

pyvirtualcam GitHub 说支持 Mac,但我在 M1 上直接安装失败 M1 使用这个命令源码安装成功 https://github.com/letmaik/pyvirtualcam/issues/97#issuecomment-1537219406

Ikaros-521 commented 7 months ago

pyvirtualcam

pyvirtualcam GitHub 说支持 Mac,但我在 M1 上直接安装失败 M1 使用这个命令源码安装成功 https://github.com/letmaik/pyvirtualcam/issues/97#issuecomment-1537219406

好好好

Bestbbb commented 6 months ago

mac想弄抖音是不是够呛了 我看文档还得安装第三方的exe依赖

Ikaros-521 commented 6 months ago

mac想弄抖音是不是够呛了 我看文档还得安装第三方的exe依赖

确实,得自行编译

zzz0908 commented 6 months ago

16G 512G mac m1使用PD虚拟机运行windows整包行吗

Honst211 commented 4 months ago

Mac M1在使用keyboard库时百分百复现问题Process finished with exit code 139 (interrupted by signal 11: SIGSEGV),注释后可以正常使用

Ikaros-521 commented 4 months ago

16G 512G mac m1使用PD虚拟机运行windows整包行吗

试试 配置肯定是够的 主要是虚拟机好不好用

Ikaros-521 commented 4 months ago

Mac M1在使用keyboard库时百分百复现问题Process finished with exit code 139 (interrupted by signal 11: SIGSEGV),注释后可以正常使用

这库没记错好像确实不兼容mac

watchpoints commented 4 months ago

AttributeError: module 'pygetwindow' has no attribute 'getWindowsWithTitle' mac

Ikaros-521 commented 4 months ago

AttributeError: module 'pygetwindow' has no attribute 'getWindowsWithTitle' mac

pip install pygetwindow试试,不行的话 那只能删掉对应功能了

luofeng0603 commented 3 months ago

Traceback (most recent call last): File "/Users/fengluo/AI-Vtuber/webui.py", line 15, in from utils.audio import Audio File "/Users/fengluo/AI-Vtuber/utils/audio.py", line 16, in from elevenlabs import generate, play, set_api_key ImportError: cannot import name 'generate' from 'elevenlabs' (/opt/miniconda3/envs/py310/lib/python3.10/site-packages/elevenlabs/init.py) 这个咋解决呢?

Ikaros-521 commented 3 months ago

elevenlabs

降低elevenlabs版本到1.x

luofeng0603 commented 3 months ago

elevenlabs

降低elevenlabs版本到1.x

(py310) ➜ AI-Vtuber % pip show elevenlabs Name: elevenlabs Version: 1.0.5 Summary: Home-page: Author: Author-email: License: Location: /opt/miniconda3/envs/py310/lib/python3.10/site-packages Requires: httpx, ipython, pydantic, requests, typing_extensions, websockets

就是1.0.5的版本呢~~

yiyi17 commented 3 months ago

python webui.py pygame 2.5.2 (SDL 2.28.3, Python 3.12.3) Hello from the pygame community. https://www.pygame.org/contribute.html Traceback (most recent call last): File "/Users/macbook/project/AI-Vtuber/webui.py", line 15, in from utils.audio import Audio File "/Users/macbook/project/AI-Vtuber/utils/audio.py", line 16, in from elevenlabs import generate, play, set_api_key ImportError: cannot import name 'generate' from 'elevenlabs' (/usr/local/lib/python3.12/site-packages/elevenlabs/init.py)

$ pip show elevenlabs Name: elevenlabs Version: 1.2.0 Summary: Home-page: Author: Author-email: License: Location: /usr/local/lib/python3.12/site-packages Requires: httpx, ipython, pydantic, requests, typing_extensions, websockets Required-by:

我遇到这个问题

pip install pydantic===2.0.3 pip install elevenlabs===0.2.27

就好了

Ikaros-521 commented 3 months ago

elevenlabs

降低elevenlabs版本到1.x

(py310) ➜ AI-Vtuber % pip show elevenlabs Name: elevenlabs Version: 1.0.5 Summary: Home-page: Author: Author-email: License: Location: /opt/miniconda3/envs/py310/lib/python3.10/site-packages Requires: httpx, ipython, pydantic, requests, typing_extensions, websockets

就是1.0.5的版本呢~~

降到0.x 记错了 emm

limin1993 commented 1 month ago

Mac启动时候报错: python3 webui.py /Users/minimax/Library/Python/3.9/lib/python/site-packages/urllib3/init.py:34: NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020 warnings.warn( Traceback (most recent call last): File "/Users/minimax/platform-ai/AI-Vtuber/webui.py", line 10, in from utils.common import Common File "/Users/minimax/platform-ai/AI-Vtuber/utils/common.py", line 27, in import cv2 File "/Users/minimax/Library/Python/3.9/lib/python/site-packages/cv2/init.py", line 5, in from .cv2 import * ImportError: dlopen(/Users/minimax/Library/Python/3.9/lib/python/site-packages/cv2/cv2.cpython-39-darwin.so, 0x0002): Library not loaded: '/opt/homebrew/opt/ffmpeg/lib/libavcodec.58.dylib' Referenced from: '/Users/minimax/Library/Python/3.9/lib/python/site-packages/cv2/cv2.cpython-39-darwin.so' Reason: tried: '/opt/homebrew/opt/ffmpeg/lib/libavcodec.58.dylib' (no such file), '/usr/local/lib/libavcodec.58.dylib' (no such file), '/usr/lib/libavcodec.58.dylib' (no such file), '/opt/homebrew/Cellar/ffmpeg/7.0.1/lib/libavcodec.58.dylib' (no such file), '/usr/local/lib/libavcodec.58.dylib' (no such file), '/usr/lib/libavcodec.58.dylib' (no such file)

Ikaros-521 commented 1 month ago

Mac启动时候报错: python3 webui.py /Users/minimax/Library/Python/3.9/lib/python/site-packages/urllib3/init.py:34: NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020 warnings.warn( Traceback (most recent call last): File "/Users/minimax/platform-ai/AI-Vtuber/webui.py", line 10, in from utils.common import Common File "/Users/minimax/platform-ai/AI-Vtuber/utils/common.py", line 27, in import cv2 File "/Users/minimax/Library/Python/3.9/lib/python/site-packages/cv2/init.py", line 5, in from .cv2 import * ImportError: dlopen(/Users/minimax/Library/Python/3.9/lib/python/site-packages/cv2/cv2.cpython-39-darwin.so, 0x0002): Library not loaded: '/opt/homebrew/opt/ffmpeg/lib/libavcodec.58.dylib' Referenced from: '/Users/minimax/Library/Python/3.9/lib/python/site-packages/cv2/cv2.cpython-39-darwin.so' Reason: tried: '/opt/homebrew/opt/ffmpeg/lib/libavcodec.58.dylib' (no such file), '/usr/local/lib/libavcodec.58.dylib' (no such file), '/usr/lib/libavcodec.58.dylib' (no such file), '/opt/homebrew/Cellar/ffmpeg/7.0.1/lib/libavcodec.58.dylib' (no such file), '/usr/local/lib/libavcodec.58.dylib' (no such file), '/usr/lib/libavcodec.58.dylib' (no such file)

看着问题不止一个 ssl看着应该是版本问题 cv2的ffmepg 缺库 应该是没装好

JackChow6 commented 1 month ago

问题

在哪注释呢

Ikaros-521 commented 1 month ago

问题

在哪注释呢

。。。 requirements.txt

Neo-Pz commented 1 month ago

Python 3.10.11 (main, May 17 2023, 14:30:36) [Clang 14.0.6 ] on darwin Type "help", "copyright", "credits" or "license" for more information.

2024-06-26 10:51:26 - /Users/genon/Desktop/code/vision/AI-Vtuber/webui.py[line:269] - INFO: 停止程序和它所有的子进程: main with PID 6435

Ikaros-521 commented 1 month ago

Python 3.10.11 (main, May 17 2023, 14:30:36) [Clang 14.0.6 ] on darwin Type "help", "copyright", "credits" or "license" for more information.

2024-06-26 10:51:26 - /Users/genon/Desktop/code/vision/AI-Vtuber/webui.py[line:269] - INFO: 停止程序和它所有的子进程: main with PID 6435

怎么了,停止程序会终止主进程是吗

Neo-Pz commented 1 month ago

Python 3.10.11 (main, May 17 2023, 14:30:36) [Clang 14.0.6 ] on darwin Type "help", "copyright", "credits" or "license" for more information.

2024-06-26 10:51:26 - /Users/genon/Desktop/code/vision/AI-Vtuber/webui.py[line:269] - INFO: 停止程序和它所有的子进程: main with PID 6435

怎么了,停止程序会终止主进程是吗 一健运行后,就进入python界面了

Neo-Pz commented 1 month ago

(vtuber) (venv) genon@Liuan ~/Desktop/code/vision/AI-Vtuber % python webui.py /Users/genon/Desktop/code/vision/AI-Vtuber/venv/lib/python3.9/site-packages/urllib3/init.py:34: NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020 warnings.warn( pygame 2.6.0 (SDL 2.28.4, Python 3.9.6) Hello from the pygame community. https://www.pygame.org/contribute.html 2024-06-26 16:27:01 - /Users/genon/Desktop/code/vision/AI-Vtuber/utils/audio.py[line:84] - INFO: 文案模式的Audio初始化... 2024-06-26 16:27:01 - /Users/genon/Desktop/code/vision/AI-Vtuber/webui.py[line:5310] - INFO: 本地Live2D模型名列表:['Hiyori', 'Haru', 'hibiki'] NiceGUI ready to go on http://localhost:8081 2024-06-26 16:27:12 - /Users/genon/Desktop/code/vision/AI-Vtuber/webui.py[line:258] - INFO: 运行程序: main 2024-06-26 16:27:12 - /Users/genon/Desktop/code/vision/AI-Vtuber/webui.py[line:333] - INFO: 程序开始运行 Python 3.9.6 (default, Mar 29 2024, 10:51:09) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin Type "help", "copyright", "credits" or "license" for more information.

点击一键运行后,就进入python界面了。不应该是读取弹幕滚动吗

Ikaros-521 commented 1 month ago

(vtuber) (venv) genon@Liuan ~/Desktop/code/vision/AI-Vtuber % python webui.py /Users/genon/Desktop/code/vision/AI-Vtuber/venv/lib/python3.9/site-packages/urllib3/init.py:34: NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: urllib3/urllib3#3020 warnings.warn( pygame 2.6.0 (SDL 2.28.4, Python 3.9.6) Hello from the pygame community. https://www.pygame.org/contribute.html 2024-06-26 16:27:01 - /Users/genon/Desktop/code/vision/AI-Vtuber/utils/audio.py[line:84] - INFO: 文案模式的Audio初始化... 2024-06-26 16:27:01 - /Users/genon/Desktop/code/vision/AI-Vtuber/webui.py[line:5310] - INFO: 本地Live2D模型名列表:['Hiyori', 'Haru', 'hibiki'] NiceGUI ready to go on http://localhost:8081 2024-06-26 16:27:12 - /Users/genon/Desktop/code/vision/AI-Vtuber/webui.py[line:258] - INFO: 运行程序: main 2024-06-26 16:27:12 - /Users/genon/Desktop/code/vision/AI-Vtuber/webui.py[line:333] - INFO: 程序开始运行 Python 3.9.6 (default, Mar 29 2024, 10:51:09) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin Type "help", "copyright", "credits" or "license" for more information.

点击一键运行后,就进入python界面了。不应该是读取弹幕滚动吗

webui.py,def start_programs(): 内 改成下面这个试试

if common.detect_os() in ['Linux', 'MacOS']: