AttributeError:'module'对象没有属性'MutableSet'(AttributeError: 'module' obj

编程入门 行业动态 更新时间:2024-10-24 14:21:16
AttributeError:'module'对象没有属性'MutableSet'(AttributeError: 'module' object has no attribute 'MutableSet')

我通过下载zip并运行命令'pip install -e path / to / bittornado /'来安装没有root访问权限的BitTornado 。 安装成功但当我尝试使用它来下载文件时,发生以下错误 - AttributeError:'module'对象没有属性'MutableSet'。 以下屏幕截图包含详细信息。

我是Python的新手。 如果有人知道发生了什么,请帮忙。 提前致谢。

I installed BitTornado without root access by downloading the zip and running command 'pip install -e path/to/bittornado/'. The installation was successful but when I tried using it for downloading the file, the following error occurred -- AttributeError: 'module' object has no attribute 'MutableSet'. The following screenshot has the details.

I'm new to Python. If someone know what's happening, please help. Thanks in advance.

最满意答案

BitTornado只支持python3(而不支持python2.x)。 特定错误是由于python3的更改导致默认情况下导入绝对(除非使用相对导入语法) - 因此它导入import collections的BitTorando.Types.collections模块。

我建议制作一个python3 virtualenv并在那里安装BitTornado。 (或者,如果您想要系统范围的安装,请使用pip3 install ... )

BitTornado only supports python3 (and not python2.x). The specific error is due to a change in python3 which makes imports absolute by default (unless the relative import syntax is used) -- as such it is importing the BitTorando.Types.collections module for import collections.

I'd suggest making a python3 virtualenv and installing BitTornado there. (Or if you want a system-wide installation, use pip3 install ...)

更多推荐

本文发布于:2023-07-31 01:47:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1340557.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:属性   对象   module   AttributeError   object

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!