Python 2.7 如何在Mac上将BeautifulSoup4安装到python3
我在/usr/bin/Python中有原始的Python 2.7.5,我通过在/usr/local/bin/Python3中下载Python 3.5.1包安装了Python3,然后安装了BeautifulSoup4,如下所示:Python 2.7 如何在Mac上将BeautifulSoup4安装到python3,python-2.7,python-3.x,beautifulsoup,bs4,Python 2.7,Python 3.x,Beautifulsoup,Bs4,我在/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
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
伟大的我刚试过pip,但没有pip,应该是pip3!