Reputation: 65
When I try to run pip install email
it gives me an error like this
C:\Users\HARSH>pip install email
Collecting email
Using cached email-4.0.2.tar.gz (1.2 MB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\harsh\appdata\local\programs\python\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\HARSH\\AppData\\Local\\Temp\\pip-install-r9nu2nma\\email\\setup.py'"'"'; __file__='"'"'C:\\Users\\HARSH\\AppData\\Local\\Temp\\pip-install-r9nu2nma\\email\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\HARSH\AppData\Local\Temp\pip-pip-egg-info-__0a9ff4'
cwd: C:\Users\HARSH\AppData\Local\Temp\pip-install-r9nu2nma\email\
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\harsh\appdata\local\programs\python\python38\lib\site-packages\setuptools\__init__.py", line 16, in <module>
import setuptools.version
File "c:\users\harsh\appdata\local\programs\python\python38\lib\site-packages\setuptools\version.py", line 1, in <module>
import pkg_resources
File "c:\users\harsh\appdata\local\programs\python\python38\lib\site-packages\pkg_resources\__init__.py", line 33, in <module>
import email.parser
File "C:\Users\HARSH\AppData\Local\Temp\pip-install-r9nu2nma\email\email\parser.py", line 10, in <module>
from cStringIO import StringIO
ModuleNotFoundError: No module named 'cStringIO'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Upvotes: 0
Views: 2597
Reputation: 8579
You should not install email, you should only import email as it's part of the Python standard library.
It is possible to visualize and search the Python standard library here.
Another potential issue could be that your Python script file is called email.py.
If this is the case please try and change its name.
Upvotes: 2