Python 官方文档:入门教程 => 点击学习
目录 报错说明报错翻译猜测原因解决方法结果 报错说明 在cmd下载BeautifulSoup的时候,输入以下命令: pip install BeautifulSoup 出现以下报错:
在cmd下载BeautifulSoup的时候,输入以下命令:
pip install BeautifulSoup
出现以下报错:
error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [7 lines of output] Traceback (most recent call last): File "" , line 2, in <module> File "" , line 34, in <module> File "C:\Users\Administrator\AppData\Local\Temp\pip-install-pgs6hik1\beautifulsoup_06fde544331044f484b06f853e2c9761\setup.py", line 3 "You're trying to run a very old release of Beautiful Soup under Python 3. This will not work."<>"Please use Beautiful Soup 4, available through the pip package 'beautifulsoup4'." ^ SyntaxError: invalid syntax [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.C:\Users\Administrator\AppData\Local\Programs\Python\python38>
错误:子进程退出,出现错误×python setup.py egg_info未成功运行。│ 退出代码:1╰─> [7行输出]回溯(最近一次调用):文件“<string>”,第2行,在<module>中文件“<pip setuptools caller>”,第34行,在<module>中文件“C:\Users\Administrator\AppData\Local\Temp\pip-install-pgs6hik1\beautuloup_06fde544331044f484b06f853e2c9761\setup.py”,第3行“您正在尝试在Python 3下运行一个非常旧的Beautiful Soup版本。这行不通。“<>”请使用Beautiful Soup 4,可通过pip包“Beautiful oup4”获得。"^语法错误:无效语法[输出结束]注意:此错误源自子流程,可能不是pip的问题。错误:元数据生成失败×生成包元数据时遇到错误。╰─> 输出见上文。注意:这是上面提到的包的问题,而不是pip。提示:详见上文。
版本不兼容
BeautifulSoup目前适用版本是4.x,前面的版本已停止开发
pip install BeautifulSoup4
Collecting beautifulsoup4 Downloading beautifulsoup4-4.11.1-py3-none-any.whl (128 kB) ---------------------------------------- 128.2/128.2 kB 137.1 kB/s eta 0:00:00Collecting soupsieve>1.2 Downloading soupsieve-2.3.2.post1-py3-none-any.whl (37 kB)Installing collected packages: soupsieve, beautifulsoup4Successfully installed beautifulsoup4-4.11.1 soupsieve-2.3.2.post1
来源地址:https://blog.csdn.net/2301_76257812/article/details/128753181
--结束END--
本文标题: 报错: error: subprocess-exited-with-error
本文链接: https://www.lsjlt.com/news/392102.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0