Collecting BeautifulSoup Using cached BeautifulSoup-3.2.2.tar.gz (32 kB) Preparing metadata (setup.py) ... error 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 "<string>", line 2, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "C:\Users\Lenovo\AppData\Local\Temp\pip-install-wwckn9qw\beautifulsoup_cd386e3e7ae14b8988153f9c919e4f80\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.
时间: 2024-01-31 16:04:49 浏览: 340
数字验证覆盖率收集用户手册
这个错误提示是在安装 BeautifulSoup 时出现的。根据错误提示,你正在尝试在 Python 3 下运行一个非常旧的版本的 Beautiful Soup,这是无法工作的。建议你使用 Beautiful Soup 4,可以通过 pip 包 'beautifulsoup4' 安装。你可以使用以下命令安装 Beautiful Soup 4:
```
pip install beautifulsoup4
```
安装完成后,你可以在 Python 中导入 Beautiful Soup 进行使用。
阅读全文