I came across this strange error while writing code using PyDev on Linux. Even a simple code like this produces error
print 'Hello World'
and the error is here
True
Traceback (most recent call last):
File "/usr/lib/python2.7/site.py", line 62, in <module>
import os
File "/usr/lib/python2.7/os.py", line 398, in <module>
import UserDict
File "/usr/lib/python2.7/UserDict.py", line 83, in <module>
import _abcoll
File "/usr/lib/python2.7/_abcoll.py", line 11, in <module>
from abc import ABCMeta, abstractmethod
ImportError: cannot import name ABCMeta
my module is named sample.py. Please help me. Thanks
My guess is that you have a file named either abc.py
or abc.pyc
in your working directory or PYTHONPATH and that one shadows the stdlib abc
module.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With