文書の過去の版を表示しています。
BeautifulSoup のインストール
Python 仮想環境
Python バージョン確認
$ python -VV
Python 3.7.7 (default, Mar 13 2020, 10:23:39) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)]
Python 仮想環境の作成
$ python -m venv py3_scraping
Python 仮想環境の有効化
$ . py3_scraping/bin/activate
(py3_scraping) $
Python 仮想環境の pip を更新
(py3_scraping) $ python -m pip install --upgrade pip
Collecting pip Downloading https://files.pythonhosted.org/packages/54/2e/df11ea7e23e7e761d484ed3740285a34e38548cf2bad2bed3dd5768ec8b9/pip-20.1-py2.py3-none-any.whl (1.5MB) |████████████████████████████████| 1.5MB 2.0MB/s Installing collected packages: pip Found existing installation: pip 19.1.1 Uninstalling pip-19.1.1: Successfully uninstalled pip-19.1.1 Successfully installed pip-20.1
インストール
- BeautifulSoup をインストールするには、以下のコマンドを実行する。
$ pip3 install beautifulsoup
- ダウンロードが開始されてインストールされる。
Downloading/unpacking beautifulsoup Downloading BeautifulSoup-3.2.0.tar.gz Running setup.py egg_info for package beautifulsoup Installing collected packages: beautifulsoup Running setup.py install for beautifulsoup Successfully installed beautifulsoup Cleaning up...