(venv) wu@wudeMacBook-Pro excel % pip install email
Collecting email
Using cached email-4.0.2.tar.gz (1.2 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
使用pip下载email包时提示上述错误,同时还建议升级pip版本。
但经验证,跟Python、pip版本无关
真正的原因是email包是Python自带的包,不需要下载
![](https://img-blog.csdnimg.cn/img_convert/5f49ff35c52e36f42e26b231a934cf0c.png)