导入错误来自六个导入raise_from'

时间:2016-07-28 18:54:04

标签: python six

我试图使用gmusicapi(https://github.com/simon-weber/gmusicapi)。但是,当我尝试以下行时:

from gmusicapi import Webclient

我收到以下错误消息:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/gmusicapi-10.0.2rc1-py2.7.egg/gmusicapi/__init__.py", line 4, in <module>
    from gmusicapi.clients import Webclient, Musicmanager, Mobileclient
  File "/usr/local/lib/python2.7/dist-packages/gmusicapi-10.0.2rc1-py2.7.egg/gmusicapi/clients/__init__.py", line 2, in <module>
    from gmusicapi.clients.webclient import Webclient
  File "/usr/local/lib/python2.7/dist-packages/gmusicapi-10.0.2rc1-py2.7.egg/gmusicapi/clients/webclient.py", line 11, in <module>
    from gmusicapi.protocol import webclient
  File "/usr/local/lib/python2.7/dist-packages/gmusicapi-10.0.2rc1-py2.7.egg/gmusicapi/protocol/webclient.py", line 6, in <module>
    from six import raise_from
ImportError: cannot import name raise_from

我不确定为什么我无法导入raise_from。

我在1.5.2运行python2.7.6六个版本

1 个答案:

答案 0 :(得分:4)

对我来说很好。我有python 2.7.5。

试试这个pip install --upgrade six