Python安装模块错误

时间:2016-05-19 11:05:38

标签: python module

我安装了这个模块

https://github.com/un33k/python-emailahoy/

使用sudo

easy_install python-emailahoy

但如果我弄错了他的代码我就会收到此错误

import sys
from emailahoy import VerifyEmail
e = VerifyEmail()
status = e.verify_email_smtp(
                    email='sss@sss.com',
                    from_host='mydomain.com',
                    from_email='verify@mydomain.com'
                )
if e.was_found(status):
    print >> sys.stderr, "Found:", status
elif e.not_found(status):
    print >> sys.stderr, "Not Found:", status
else:
    print >> sys.stderr, "Unverifiable:", status

错误:

Traceback (most recent call last):
  File "email_script.py", line 3, in <module>
    from emailahoy import VerifyEmail
  File "build/bdist.linux-x86_64/egg/emailahoy/__init__.py", line 4, in <module>
  File "/usr/lib/python2.7/smtplib.py", line 46, in <module>
    import email.utils
  File "/root/email_script.py", line 3, in <module>
    from emailahoy import VerifyEmail

如何修复并使该库正常工作?

0 个答案:

没有答案