简体   繁体   English

从“从六个导入raise_from”导入错误

[英]Import error on 'from six import raise_from'

I'm trying to use the gmusicapi( https://github.com/simon-weber/gmusicapi ). 我正在尝试使用gmusicapi( https://github.com/simon-weber/gmusicapi )。 However when I try the following line: 但是,当我尝试以下行时:

from gmusicapi import Webclient

I get the following error message: 我收到以下错误消息:

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

I'm not sure why I am unable to import raise_from. 我不确定为什么我不能导入raise_from。

I'm running python2.7.6 with six version at 1.5.2 我正在以1.5.2的六个版本运行python2.7.6

It works fine for me. 这对我来说可以。 And I have python 2.7.5. 我有python 2.7.5。

Try this pip install --upgrade six 尝试此pip install --upgrade six

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我试图打开anaconda导航器,但不断弹出以下错误:“ ImportError:无法导入名称&#39;raise_from&#39;” - I tried to open anaconda navigator but following error keeps poping: “ ImportError: cannot import name 'raise_from' ” AttributeError:“模块”对象没有六个库的属性“ raise_from” - AttributeError: 'module' object has no attribute 'raise_from' for six library 无法从Python六库中导入 - Cannot import from Python six library Python 导入错误:无法从“sklearn.externals”导入名称“六” - Python import error: cannot import name 'six' from 'sklearn.externals' 从 skrules 导入 SkopeRules 导入错误:无法导入名称“六” - from skrules import SkopeRules ImportError: cannot import name 'six' 为什么__future__ import *引发错误? - Why does from __future__ import * raise an error? 我在 spyder ImportError: cannot import name 'six' from 'sklearn.externals' 尽管我已经安装了六个模块 - i got this error on spyder ImportError: cannot import name 'six' from 'sklearn.externals' despite i have installed the six module 安装错误:无法从“six.moves”(未知位置)导入名称“collections_abc” - installation error: cannot import name 'collections_abc' from 'six.moves' (unknown location) Pytorch 错误:ImportError: cannot import name 'container_abcs' from 'torch._six' - Pytorch error: ImportError: cannot import name 'container_abcs' from 'torch._six' 导入错误:无法从 &#39;six&#39; 导入名称 &#39;ensure_str&#39; - ImportError: cannot import name 'ensure_str' from 'six'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM