0

I am having trouble installing packages for python using pip with python 3.7.3 on windows 10. enter image description here

I have installed pip, and used the command "pip install emaildata --user" to get the emaildata package.

I tried different versions of the command, like "py-3.7 install emaildata --user" and the regular old "pip install emaildata", but I keep getting an error:

enter image description here

It says Microsoft Visual Studio Build Tools is required, but I downloaded that correctly and it didn't make a difference.

Am I using the command prompt incorrectly? I have googled and looked for the answer but I really need your help!

Thanks in advance.

maanijou
  • 1,067
  • 1
  • 14
  • 23
IsabellaW
  • 1,093
  • 1
  • 8
  • 7
  • 1
    Some libraries need to be compiled with appropriate build tools. This is more frustrating in windows. I think python 3.7 needs vstudio build tools 2017: `https://visualstudio.microsoft.com/vs/older-downloads/`. Make sure you installed the right version and check again. – maanijou Jun 30 '19 at 04:25

1 Answers1

1

I finally found the definitive answer! :-D Emaildata package has not been updated for a long time and is NOT compatible with python 3.x. It can only be used with python 2.7. Use email package instead. No need to install "email", since it is included in the standard Python.

# Use import email to start using it from python code.  
import email
email
######## output #########
>>> import email
>>> email
<module 'email' from 'C:\\python\\conda3\\lib\\email\\__init__.py'>

See Reading .eml files with Python 3.6 using emaildata 0.3.4 . Link also has examples of using the email library.

emaildata module has not been updated for over 2 years. It is not compatible with python 3. Consider using the email package from the standard library. – Dmitri Chubarov Aug 14 '17 at 17:19

Jennifer Yoon
  • 791
  • 5
  • 10