我想在虚拟环境中安装 bs4,但是发生了错误,我不知道为什么。我已经更新了 bs4、pip 和 pipenv。这是错误:C:\Users\ACER\Desktop\PYTEST\temp>pipenv install beautifulsoup4Installing beautifulsoup4…Adding beautifulsoup4 to Pipfile's [packages]…Installation SucceededInstalling dependencies from Pipfile.lock (06c5f2)…An error occurred while installing beautifulsoup==3.2.2 --hash=sha256:a04169602bff6e3138b1259dbbf491f5a27f9499dea9a8fbafd48843f9d89970 --hash=sha256:d31413d71f6ca027ff6b06c891b62ee8ff48267ccd969f881d810e5d1fe49565! Will try again. ================================ 9/9 - 00:00:05Installing initially failed dependencies…[pipenv.exceptions.InstallError]: File "c:\users\acer\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 1992, in do_install[pipenv.exceptions.InstallError]: skip_lock=skip_lock,[pipenv.exceptions.InstallError]: File "c:\users\acer\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 1253, in do_init[pipenv.exceptions.InstallError]: pypi_mirror=pypi_mirror,[pipenv.exceptions.InstallError]: File "c:\users\acer\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 859, in do_install_dependencies[pipenv.exceptions.InstallError]: retry_list, procs, failed_deps_queue, requirements_dir, **install_kwargs[pipenv.exceptions.InstallError]: File "c:\users\acer\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 763, in batch_install[pipenv.exceptions.InstallError]: _cleanup_procs(procs, not blocking, failed_deps_queue, retry=retry)[pipenv.exceptions.InstallError]: File "c:\users\acer\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 681, in _cleanup_procs[pipenv.exceptions.InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines)
3 回答
慕后森
TA贡献1802条经验 获得超5个赞
错误消息格式错误,但信息在那里......
“您正试图在 Python 3 下运行非常旧的 Beautiful Soup 版本。这将不起作用。”<>“请使用 Beautiful Soup 4,可通过 pip 包 \'beautifulsoup4\' 获得。”
同样在您的跟踪开始时,它清楚地表明它正在尝试安装beautifulsoup
,显然是因为它在您的Pipfile.lock
. 显然你想要beautifulsoup4
。只要解决这个问题,你就可以开始了。
婷婷同学_
TA贡献1844条经验 获得超8个赞
pipenv
已成功安装beautifulsoup4
,在跟踪中可以看到:
正在安装 beautifulsoup4...
将 beautifulsoup4 添加到 Pipfile 的 [packages]...
安装成功
该错误发生在pipenv
尝试完成先前失败的依赖项的安装之后,在这种情况下beautifulsoup 3.2.2
。beautifulsoup
要解决此问题,您应该使用以下命令从Pipfile.lock
依赖项中删除旧版本:
pipenv uninstall beautifulsoup
添加回答
举报
0/150
提交
取消