IsabellaW
IsabellaW

Reputation: 1173

How to install packages using pip in Python 3.7 on Windows 10

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.

Upvotes: 0

Views: 4008

Answers (1)

Jennifer Yoon
Jennifer Yoon

Reputation: 821

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

Upvotes: 1

Related Questions