0
我在Mac上搞亂了pyspotify,我一直在閱讀例子和文檔。我下載了一個示例應用程序(從pyspotify混帳回購協議的jukebox.py例子),當我在命令行中運行它,我得到如下:OSX上的pyspotify問題
Traceback (most recent call last):
File "jukebox.py", line 15, in <module>
AudioSink = import_audio_sink()
File "/Library/Python/2.7/site-packages/spotify/audiosink/__init__.py", line 45, in import_audio_sink
raise ImportError, "\n".join(error_messages)
ImportError: Tried to use spotify.audiosink.alsa.AlsaSink as audio sink, but failed:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/spotify/audiosink/__init__.py", line 36, in import_audio_sink
module = __import__(module, fromlist=[cls])
File "/Library/Python/2.7/site-packages/spotify/audiosink/alsa.py", line 1, in <module>
import alsaaudio
ImportError: No module named alsaaudio
Tried to use spotify.audiosink.oss.OssSink as audio sink, but failed:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/spotify/audiosink/__init__.py", line 36, in import_audio_sink
module = __import__(module, fromlist=[cls])
File "/Library/Python/2.7/site-packages/spotify/audiosink/oss.py", line 1, in <module>
import ossaudiodev
ImportError: No module named ossaudiodev
Tried to use spotify.audiosink.portaudio.PortAudioSink as audio sink, but failed:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/spotify/audiosink/__init__.py", line 36, in import_audio_sink
module = __import__(module, fromlist=[cls])
File "/Library/Python/2.7/site-packages/spotify/audiosink/portaudio.py", line 1, in <module>
import pyaudio
ImportError: No module named pyaudio
Tried to use spotify.audiosink.gstreamer.GstreamerSink as audio sink, but failed:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/spotify/audiosink/__init__.py", line 36, in import_audio_sink
module = __import__(module, fromlist=[cls])
File "/Library/Python/2.7/site-packages/spotify/audiosink/gstreamer.py", line 3, in <module>
import gobject
ImportError: No module named gobject
Was not able to import any of the audio sinks
我得到的Python包裝各種音頻API /源不存在,但我怎麼知道我是否需要/如何安裝gobject或pyaudio及其支持API?我嘗試過pyaudio,但它失敗了,因爲我沒有包裝它的庫(我認爲)。有沒有人得到過這個?謝謝!
您是否設法爲此找到解決方案?我也一樣在苦苦掙扎? – skywlkr