作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在/usr/bin/python中有原始的Python 2.7.5,我通过在/usr/local/bin/python3中下载Python 3.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 in easy-install.pth
Using /Library/Python/2.7/site-packages/beautifulsoup4-4.4.1-py2.7.egg
Processing dependencies for BeautifulSoup4
Finished processing dependencies for BeautifulSoup4
这样我就无法在python3中使用bs4了,如何在python3上安装bs4呢?
最佳答案
您应该使用pip3
可执行文件:
sudo pip3 install beautifulsoup4
<小时/>
如果您没有安装pip3
:
curl bootstrap.pypa.io/get-pip.py | python3
关于python-2.7 - 如何在Mac上安装BeautifulSoup4到python3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35532234/
我是一名优秀的程序员,十分优秀!