[vagrant@localhost python]$ pip3 install beautifulsoup4
Collecting beautifulsoup4
Downloading https://files.pythonhosted.org/packages/fe/62/720094d06cb5a92cd4b3aa3a7c678c0bb157526a95c4025d15316d594c4b/beautifulsoup4-4.6.1-py3-none-any.whl (89kB)
100% |████████████████████████████████| 92kB 180kB/s
Installing collected packages: beautifulsoup4
Successfully installed beautifulsoup4-4.6.1
You are using pip version 8.1.1, however version 18.0 is available.
You should consider upgrading via the ‘pip install –upgrade pip’ command.
ついでにpipもupgradeします。
[vagrant@localhost python]$ pip install –upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 346kB/s
Installing collected packages: pip
Found existing installation: pip 8.1.1
Uninstalling pip-8.1.1:
Successfully uninstalled pip-8.1.1
Successfully installed pip-18.0
数年前、初めてpython触った時、beautifulsoupをインストールできなくて、pythonのスクレピングを諦めたことあったな。あの時なんでできなかったんだろう。今だと一瞬でできるな。