[英]Can't install email module in Python 3.8
I'm using Python 3.8 and pip 19.3.1 on Windows 10 and when I try to pip install email
I get an error:我在 Windows 10 上使用 Python 3.8 和 pip 19.3.1,当我尝试
pip install email
出现错误:
ERROR: Command errored out with exit status 1:
command: 'c:\users\User\appdata\local\programs\python\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-8nsypvg1\\email\\setup.py'"'"'; __file__='"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-8nsypvg1\\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\User\AppData\Local\Temp\pip-install-8nsypvg1\email\pip-egg-info'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-8nsypvg1\email\
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\User\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 18, in <module>
import setuptools.version
File "c:\users\User\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\version.py", line 1, in <module>
import pkg_resources
File "c:\users\User\appdata\local\programs\python\python38-32\lib\site-packages\pkg_resources\__init__.py", line 36, in <module>
import email.parser
File "C:\Users\User\AppData\Local\Temp\pip-install-8nsypvg1\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
How do I get this module installed?如何安装此模块?
The email
module was distributed for pythons 2.3 and 2.4. email
模块是为 python 2.3 和 2.4 分发的。 Starting with 2.5, it was included in the standard python distribution.从 2.5 开始,它包含在标准的 Python 发行版中。 You're looking for https://docs.python.org/3/library/email.html
您正在寻找https://docs.python.org/3/library/email.html
Module 'email' is deprecated and no longer being updated.模块“电子邮件”已弃用,不再更新。 It was last updated on Jul 19, 2011. Latest version of python at that time was Python 2.7
最后更新于 2011 年 7 月 19 日。当时最新版本的 python 是 Python 2.7
So, it doesn't support Python 3.8.因此,它不支持 Python 3.8。 What you can do is install it in Python 2.7
您可以做的是将其安装在 Python 2.7 中
Use the following command to install version 6.0.0 in Python 2.7使用以下命令在 Python 2.7 中安装 6.0.0 版
pip install email==6.0.0a1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.