Skip to main content
 首页 » 编程设计

python之运行 spotify python 脚本时出错

2025年05月04日8jirigala

您好,我正在尝试在我的 Mac 上运行名为 starrify 的 spotify 脚本 https://github.com/swinton/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 

知道如何解决这个问题吗?谢谢

我按照这些说明重新安装 pyspotify 来修复它 http://labs.tinkerista.com/?p=9

请您参考如下方法:

pyspotify 未正确安装(或者您运行的 python 解释器与安装时使用的不同)。您可以使用 pip install pyspotify 安装它。然后您应该能够在脚本中 import spotify 并让它成功。您也可以尝试运行 pyspotify example script首先。