BeautifulSoup4未安装Pipenv [英] Beautifulsoup4 not installing for pipenv

查看:49
本文介绍了BeautifulSoup4未安装Pipenv的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用pipenv安装beautifulsoup4,我尝试使用cmd和pycharm,两者都给出此错误

I wanted to install beautifulsoup4 with pipenv, i tried with cmd as well as pycharm, both gives this error

Installing dependencies from Pipfile.lock (0d3df0)…
Installing initially failed dependencies…

An error occurred while installing beautifulsoup==3.2.2 --hash=sha256:a04169602bff6e3138b1259dbbf491f5a27f9499dea9a8fbafd48843f9d89970 --hash=sha256:d31413d71f6ca027ff6b06c891b62ee8ff48267ccd969f881d810e5d1fe49565! Will try again.
[pipenv.exceptions.InstallError]:   File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\pipenv\core.py", line 1874, in do_install
[pipenv.exceptions.InstallError]:       keep_outdated=keep_outdated
[pipenv.exceptions.InstallError]:   File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\pipenv\core.py", line 1253, in do_init
[pipenv.exceptions.InstallError]:       pypi_mirror=pypi_mirror,
[pipenv.exceptions.InstallError]:   File "c:\users\nihaa\appdata\local\programs\python\python37-32\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\nihaa\appdata\local\programs\python\python37-32\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\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\pipenv\core.py", line 681, in _cleanup_procs
[pipenv.exceptions.InstallError]:       raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: ['Collecting beautifulsoup==3.2.2', '  Using cached BeautifulSoup-3.2.2.tar.gz (32 kB)']
[pipenv.exceptions.InstallError]: ['ERROR: Command errored out with exit status 1:', '     command: \'C:\\Users\\nihaa\\.virtualenvs\\craigs--1kFvJc3\\Scripts\\python.exe\' -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'C:\\\\Users\\\\nihaa\\\\AppData\\\\Local\\\\Temp\\\\pip-install-icq1fnsg\\\\beautifulsoup\\\\setup.py\'"\'"\'; __file__=\'"\'"\'C:\\\\Users\\\\nihaa\\\\AppData\\\\Local\\\\Temp\\\\pip-install-icq1fnsg\\\\beautifulsoup\\\\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\\nihaa\\AppData\\Local\\Temp\\pip-install-icq1fnsg\\beautifulsoup\\pip-egg-info\'', '         cwd: C:\\Users\\nihaa\\AppData\\Local\\Temp\\pip-install-icq1fnsg\\beautifulsoup\\', '    Complete output (6 lines):', '    Traceback (most recent call last):', '      File "<string>", line 1, in <module>', '      File "C:\\Users\\nihaa\\AppData\\Local\\Temp\\pip-install-icq1fnsg\\beautifulsoup\\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', '    ----------------------------------------', 'ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.']
ERROR: ERROR: Package installation failed...

推荐答案

您可以尝试

1..打开 PyCharm .

2..转到 File->设置->项目:测试(测试表示您的项目名称)->选择项目解释器->点击添加按钮

3..点击添加按钮并搜索 beautifulsoup4 ,然后安装.

3. after clicking add button and search beautifulsoup4 then install it.

这篇关于BeautifulSoup4未安装Pipenv的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆