我正在尝试使用库 pydub,但是当我运行脚本时,我得到了这个。
runfile('E:/OneDrive - usach.cl/chillbot/pydub.py', wdir='E:/OneDrive - usach.cl/chillbot')
Traceback (most recent call last):
File "<ipython-input-203-a38a65fe4502>", line 1, in <module>
runfile('E:/OneDrive - usach.cl/chillbot/pydub.py', wdir='E:/OneDrive - usach.cl/chillbot')
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 880, in runfile
execfile(filename, namespace)
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "E:/OneDrive - usach.cl/chillbot/pydub.py", line 9, in <module>
from pydub import AudioSegment
File "E:\OneDrive - usach.cl\chillbot\pydub.py", line 9, in <module>
from pydub import AudioSegment
ImportError: cannot import name 'AudioSegment'
我没有找到有关错误的信息,我正在使用带有 anaconda 的 Windows 10,我正在运行的代码是。
from pydub import AudioSegment
AudioSegment.ffmpeg = "C:\ffmpeg\bin"
song = AudioSegment.from_mp3("I_eat_Plants_for_a_living-Unfaithful.mp3")
如果我删除所有代码,除了from pydub import AudioSegment
我得到同样的错误。