我通过下载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 ...)
更多推荐
发布评论