Install pip, pyenv, BeautifulSoup4

I'm reading "Web Scraping with Python".

Web scraping with Python https://www.amazon.co.jp/dp/4873117615/ref=cm_sw_r_tw_dp_x_r1spzbAV22VJX

In order to practice this book, it is necessary to install Python and BeautifulSoup4. A memorandum of the installation procedure.

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!

This article is reprinted from my blog http://tic40.hatenablog.com/entry/2017/05/31/103459

Recommended Posts

Install pip, pyenv, BeautifulSoup4
sudo pip install
Install pyenv on mac
Install pip on Mavericks
Install pyenv and pyenv-virtualenv
How to install pip
Error with pip install
Install python (pyenv, pyenv-virtualenv)
Install the pip command
Install python with pyenv
Install pyenv on OSX
Install pip / pip3 on Ubuntu
Install scikit.learn with pip
When pip install fails
[CentOS7] Install anaconda using pyenv
When moss with pip install
Pip install in proxy environment
When pyenv install BUILD FAILED
Install github repository with pip
Pip install the GitHub repository
Install pyenv from Homebrew, install Python from pyenv
Install Python 2.7.9 and Python 3.4.x with pip.
Pip install (Windows) under Proxy environment
Pip install --ugrade pip fails on Windows
Permission denied with pip install pyopenssl
module install if pip install doesn't work
Install Python on Windows + pip + virtualenv
pip install mysql-Error handling during python
Resolved errors caused by pyenv install
pip install prevents proxy from installing
Install pyenv on EC2 (Amazon Linux)
Manipulate colors with pip install color
Install pip on CentOS7. Also iPython.
Unable to install Python with pyenv
Install Python on CentOS using Pyenv
Install Python framework django using pip
How to install mysql-connector with pip3
Install and configure `pyenv` Ansible playbook
Install python2.x on catalina with pyenv
Proxy error when running "pip install"
Wget fails during install with pyenv
Install Python on CentOS using pyenv
How to install Anaconda with pyenv
[Python Windows] pip install with Python version
Install easy_install and pip on windows
SSL certificate related with pip install? Error
Install Python as a Framework with pyenv
Accelerate CI by skipping unnecessary pip install
Solution for pip install error [Python] [Mac]
In pip install clang: error: unknown argument:'-mno-fused-madd'
`pip install pygraphviz` fails to find graphviz
I was addicted to pip install mysqlclient
I want to pip install with PythonAnywhere
Install by specifying the version with pip
Install Python package management tool pip (Windows)
scipy stumbles with pip install on python 2.7.8
Install python on xserver to use pip
Day 64 pip install tensorflow and 2.0 is here.
I just did pip install pyrebase ... (UnicodeDecodeError)
Install pyenv and Python 3.6.8 on Ubuntu 18.04 LTS
Install Python 3.8, Pip 3.8 on EC2 (Amazon Linux 2)