gpt4 book ai didi

python - 无法在 Python 3.8 中安装电子邮件模块

转载 作者:太空宇宙 更新时间:2023-11-04 11:06:45 25 4
gpt4 key购买 nike

我在 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

如何安装此模块?

最佳答案

email 模块是为 pythons 2.3 和 2.4 分发的。从 2.5 开始,它被包含在标准的 python 发行版中。您正在寻找 https://docs.python.org/3/library/email.html

关于python - 无法在 Python 3.8 中安装电子邮件模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59275913/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com