我在/usr/bin/python中有原始的python2.7.5,我通过在/usr/local/bin/python3中下载python3.5.1包安装了Python3,然后我安装了BeautifulSoup4,如下所示:
sudo easy_install BeautifulSoup4
Searching for BeautifulSoup4
Best match: beautifulsoup4 4.4.1
Processing beautifulsoup4-4.4.1-py2.7.egg
beautifulsoup4 4.4.1 is already the active version
我使用以下命令安装了BeautifulSoup:
sudo easy_install BeautifulSoup4
我收到消息:
Searching for BeautifulSoup4
Best match: beautifulsoup4 4.1.3
Processing beautifulsoup4-4.1.3-py2.6.egg
beautifulsoup4 4.1.3 is already the active version in easy-install.pth
Using /Library/Python/2.6/site-packages/beautifulsoup4-4.1.
我正在尝试设置BeautifulSoup4,以便能够运行以下操作:
from bs4 import BeautifulSoup
然而,当我去安装BeautifulSoup4时,我会得到以下内容:
Defaulting to user installation because normal site-packages is not writeable.
Requirement already satisfied: beautifulsoup4 in ./Library/Python/2.7/lib/python/site-packages (4.8.2)
Requirement already
我试图使用以下命令在mac中安装beautifulsoup4:
pip3 install beautifulsoup4
但我得到了以下错误:
Could not find a version that satisfies the requirement beautifulsoup4 (from versions: )
No matching distribution found for beautifulsoup4
我怎么才能解决这个问题?
我正在尝试构建一个python代码来检查一个字符串是否包含HTML代码。我多次尝试使用BeautifulSoup4和pip3 install lxml重新加载pip3 install beautifulsoup4库,它已经向我展示了以下内容:
Requirement already satisfied: beautifulsoup4
但是,每当我试图导入漂亮汤时,它就会出现以下错误代码:
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested
如何正确导入漂亮汤库?
下面是代码
我安装了BeautifulSoup,既使用pip install beautifulsoup4pip安装,也使用conda install -c anaconda beautifulsoup4安装,并且尝试直接从木星笔记本安装它
import pip
if int(pip.__version__.split('.')[0])>9:
from pip._internal import main
else:
from pip import main
def install(package):
m
i installed bs4 through terminal(pip3 install beautifulsoup4), and as i typed 'from bs4 import beaufitulsoup' it seemed to work but it turns out not how can i solve this problem? 我通过终端(Pip3 install beautifulsoup4)安装了bs4,当我输入“from bs import beaufitulsoup4”时,它似乎可以工作,但事实证明并非如此。我该如何解决这个问题?
我为什么要得到ImportError: cannot import name 'BeautifulSoup'
line 1, in <module>
from bs4 import BeautifulSoup
ImportError: cannot import name 'BeautifulSoup'
安装好了吗?
pip install --upgrade --force-reinstall beautifulsoup4
Collecting beautifulsoup4
Using cached beautifu
我猜这是我的电脑出现的一个孤立问题,但是我无法在我的Linux机器上安装beautfulsoup4。我从来没有遇到过pip的问题,但是这个对我不起作用。Easy_install也不适合我。我不太擅长阅读这些日志文件,但以下是pip中的日志文件:
------------------------------------------------------------
/home/croberts/.virtualenvs/lunchbox/bin/pip run on Wed Oct 16 18:32:05 2013
Downloading/unpacking BeautifulSoup
下面是显示我无法导入beautifulsoup4的完整日志
$ python
Python 3.7.5 (default, Oct 23 2019, 08:30:10)
[Clang 8.0.7 (https://android.googlesource.com/toolchain/clang b55f2d4ebfd35bf6 on linux
Type "help", "copyright", "credits" or "license" for more information.
import bs4
from bs4 im
我已经安装了beautifulsoup4,但是它不能工作。
这是我第二次尝试安装:
(k36) C:\GROWTHTECH\Projetos\blockchain>python -m pip install beautifulsoup4
Requirement already satisfied: beautifulsoup4 in c:\users\patff\appdata\local\conda\conda\envs\k36\lib\site-packages\beautifulsoup4-4.6.0-py3.6.egg
You are using pip version 9.0.
我想知道如何在Heroku服务器上使用BeautifulSoup4。 在我的requirements.txt文件中,我写道:"BeautifulSoup==4.9.1", 但我得到一个错误: ERROR: Could not find a version that satisfies the requirement BeautifulSoup==4 (from -r /tmp/build_d624b770_/requirements.txt (line 1)) (from versions: 3.2.0, 3.2.1, 3.2.2)
ERROR: No matching di
因此,当我尝试在我的chromebook上安装bs4时,它显示没有问题: pip install beautifulsoup4
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your
Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in
January 2021. More details about Python 2 suppor