运行spotify python脚本时出错

运行spotify python脚本时出错,python,macos,spotify,libspotify,Python,Macos,Spotify,Libspotify,嗨,我正在试着运行spotify的一个脚本,它是python,在我的mac上名为starrify 当我运行它时,我得到了这个错误 error "Traceback (most recent call last): File \"/Users/hnewbs/Documents/star/starrify.py\", line 7, in <module> from spotify import Link ImportError: No module named spotify" nu

嗨,我正在试着运行spotify的一个脚本,它是python,在我的mac上名为starrify

当我运行它时,我得到了这个错误

error "Traceback (most recent call last):
File \"/Users/hnewbs/Documents/star/starrify.py\", line 7, in <module>
from spotify import Link
ImportError: No module named spotify" number 1
error“回溯(最近一次调用):
文件\“/Users/hnewbs/Documents/star/starrify.py\”,第7行,在
从spotify导入链接
ImportError:没有名为spotify“1号”的模块
你知道怎么解决这个问题吗?谢谢


我通过按照以下说明重新安装pyspotify修复了此问题

pyspotify
未正确安装(或者您没有运行用于安装它的python解释器)。您可以使用
pip install pyspotify
安装它。然后,您应该能够
在脚本中导入spotify
,并使其成功。您还可以先尝试运行
pyspotify

要求:安装libspotify和pyspotify。你安装了这些依赖项吗?我已经安装了它们并重新安装了它们。这超出了我的经验。我认为必须将libspotify模块集成到python中。您可能需要在c中创建一个包装器函数,以便在python中使用libspotify。我在找细节。这超出了我的经验,因为我不打算获得一个高级spotify帐户,我祝您旅途好运。