Je lis "Web Scraping avec Python".
Web scraping avec Python https://www.amazon.co.jp/dp/4873117615/ref=cm_sw_r_tw_dp_x_r1spzbAV22VJX
Afin de pratiquer ce livre, il est nécessaire d'installer Python et BeautifulSoup4. Un mémorandum de la procédure d'installation.
install pip
$ wget https://bootstrap.pypa.io/get-pip.py
$ python get-pip.py
install pyenv
$ git clone https://github.com/yyuu/pyenv.git ~/.pyenv
PATH setting for pyenv
add the below to ~/.bash_profile
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
reload bashrc
$ source ~/.bashrc
install specific python version via pyenv
$ pyenv --version
pyenv 1.0.10-24-gacbd736
# show installable version list
$ pyenv install --list
...
stackless-3.3.5
stackless-3.4.1
stackless-3.4.2
# install specific version from the installable version list
$ pyenv install {version}
# set the version as global
$ pyenv global {version}
$ pyenv version
{version} (set by /home/uorat/.pyenv/version)
# make sure the python version
$ python -V
Python {version}
install beautifulsoup4
$ pip install beautifulsoup4
make sure to complete installing BeautifulSoup
$ python
>>> from bs4 import BeautifulSoup
completed if no error occurs!
Cet article est réimprimé de mon blog http://tic40.hatenablog.com/entry/2017/05/31/103459
Recommended Posts