[docs] from email import message_from_file

Zerbe, Brandon ZerbeB at humgen.ucsf.edu
Thu May 23 08:49:56 CEST 2013


To others with more experience and knowledge about python than I:

I was unable to run virtualenv due to an error.  Logging into an interactive session on Centos 6.2, I was able to recreate it:

>>>import distutils.dist
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/mnt/iscsi_speed/devel/Python-2.7.3_2/lib/python2.7/distutils/dist.py", line 10, in <module>
   from email import message_from_file
ImportError: cannot import name message_from_file

I get the same error for >>>from email import message_for_file.  However, >>>import email works fine, and email.message_from_file then works.

For my installation, I changed the code in /mnt/iscsi_speed/devel/Python-2.7.3_2/lib/python2.7/distutils/dist.py to import email and then the call to message_from_file to email.message_from_file.  After doing this, I could run virtualenv.  However, I am relatively new to python, and do not complete understand the cause of this issue (perhaps something with packaging?)

Sorry if this is a re-post, but I thought you might like to know.

Thanks,

B
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20130523/0e071da4/attachment-0001.html>


More information about the docs mailing list