yt-dlp 让我不断出现此错误:
操作系统:Centos 7 服务器运行于:Litespeed/Cyberpanel
Traceback (most recent call last):
File "/usr/bin/yt-dlp/yt_dlp/__init__.py", line 2, in <module>
ModuleNotFoundError: No module named 'contextvars'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/bin/yt-dlp/__main__.py", line 14, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
File "/usr/bin/yt-dlp/yt_dlp/__init__.py", line 5, in <module>
Exception: You are using an unsupported version of Python. Only Python versions 3.7 and above are supported by yt-dlp
当我运行 python-V 命令时,它给出了以下版本,该版本确实高于 v3.7
但是,当我运行 python3 命令时,它给了我这个:
我仍然很困惑我应该做什么...我已经安装了更新版本的Python。但是,python3 仍然显示 python v3.6
事实上,如果我添加别名,它可以正常工作,但同一台计算机上的其他用户将无法通过 php exec() 函数访问 yt-dlp。
我正在尝试使用 php exec() 函数来使用 yt-dlp。