开发者

Error from collections module in Python

开发者 https://www.devze.com 2023-02-28 07:56 出处:网络
I am getting the following errror when a python program is run File \"/home/user/Desktop/important/paper/ordereddict.py\",

I am getting the following errror when a python program is run

File "/home/user/Desktop/important/paper/ordereddict.py", line 1, in from collections import MutableMapping ImportError: cannot import name MutableMapping

When I tried开发者_高级运维 import collections it works fine. Please help.

I am using version Python 2.5.2


collections.MutableMapping was introduced only in Python 2.6, so you need at least that version of Python to use your ordereddict module.


You have to use Python 2.6 to use MutableMapping

0

精彩评论

暂无评论...
验证码 换一张
取 消