开发者

Python SMTP import

开发者 https://www.devze.com 2023-03-06 22:18 出处:网络
Has anyone had this before?It\'s working with all the other scripts I\'ve written. import smtplib File \"/usr/lib64/python2.4/smtplib.py\", line 49, in ?

Has anyone had this before? It's working with all the other scripts I've written.

import smtplib

File "/usr/lib64/python2.4/smtplib.py", line 49, in ? from email.base64MIME import encode as encode_base64 ImportError: N开发者_如何学Pythono module named base64MIME

And it's not called email.py!


Do python -v then import smtplib at the python command-line.

That should show you where it is getting email from.

EDIT:

Please could you post your output from the import email line.

Mine is:

import email # directory /usr/lib/python2.4/email
# /usr/lib/python2.4/email/__init__.pyc matches /usr/lib/python2.4/email/__init__.py
import email # precompiled from /usr/lib/python2.4/email/__init__.pyc
# /usr/lib/python2.4/email/base64MIME.pyc matches /usr/lib/python2.4/email/base64MIME.py
import email.base64MIME # precompiled from /usr/lib/python2.4/email/base64MIME.pyc
# /usr/lib/python2.4/email/Utils.pyc matches /usr/lib/python2.4/email/Utils.py
import email.Utils # precompiled from /usr/lib/python2.4/email/Utils.pyc
0

精彩评论

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