【问题标题】:error when running spotify python script运行 spotify python 脚本时出错
【发布时间】:2013-03-02 23:55:37
【问题描述】:

您好,我正在尝试在我的 Mac 上运行一个名为 starrify 的 Python 脚本用于 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

关于如何解决这个问题的任何想法?谢谢

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

【问题讨论】:

  • 要求:安装 libspotify 和 pyspotify。这些依赖你安装了吗?
  • 我已经安装了它们并重新安装了它们
  • 这超出了我的经验。我认为您必须将 libspotify 模块集成到 python 中。您可能需要在 c 中创建一个包装函数才能将 libspotify 与 python 一起使用。我正在寻找at this site 了解详情。这超出了我的经验,由于我不打算获得高级 Spotify 帐户,因此祝您旅途愉快。

标签: python macos spotify libspotify


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-10-07
    • 2018-01-27
    • 2019-08-23
    • 2012-04-10
    • 2013-12-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多