Ich lese "Web Scraping mit Python".
Web-Scraping mit Python https://www.amazon.co.jp/dp/4873117615/ref=cm_sw_r_tw_dp_x_r1spzbAV22VJX
Um dieses Buch zu üben, müssen Python und BeautifulSoup4 installiert werden. Ein Memorandum des Installationsvorgangs.
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!
Dieser Artikel wurde aus meinem Blog nachgedruckt http://tic40.hatenablog.com/entry/2017/05/31/103459
Recommended Posts