每当我安装和导入 gTTS 时,我都会遇到这个问题。安装问题:
ERROR: Could not install packages due to an OSError: [WinError 2] The system cannot find the file specified: 'C:\\Python310\\Scripts\\gtts-cli.exe' -> 'C:\\Python310\\Scripts\\gtts-cli.exe.deleteme'
导入问题:
Traceback (most recent call last):
File "C:/Users/User/Desktop/check.py", line 1, in <module>
from gtts import gTTS
ModuleNotFoundError: No module named 'gtts'
我做了pip install gtts
并导入了from gtts import gTTS
.
谢谢!
PS:Python版本:
3.10.0