Installing Python 3 + Scrapy on Ubuntu 16.04

You may prepare a Linux VM on laptop using VirtualBox.

For participants at Python 101 + Web Scraping on Python workshop, alternatively you can download a VirtualBox image from here.

Downloading software.

  1. Download Oracle VM VirtualBox
  2. Download Ubuntu Server 16.04.02 LTS 64-bit
    1. How to verify Ubuntu ISO image
    2. $ md5 ubuntu-16.04.2-server-amd64.iso
      MD5 (ubuntu-16.04.2-server-amd64.iso) = 2bce60d18248df9980612619ff0b34e6
  3. Optional Download JetBrains PyCharm Community Edition
English is suggested for system language, and Python 3 is default version of python software on Ubuntu Server 16.04. I suggests to install standard system utilities and OpenSSH server at Software Selection part during VM creation & installation.

After we created a VM successfully, we update installed software packages and installs other require program as root user.

$ sudo su –
$ apt update; apt upgrade
$ apt install virtualenv python3-pip libssl-dev
$ exit

As normal user:
pyconhk@ubuntu$ mkdir ~/env
pyconhk@ubuntu$ virtualenv –python=python3 ~/env/scrapy
pyconhk@ubuntu$ source ~/env/scrapy/bin/activate
(scrapy) pyconhk@ubuntu$ pip3 install scrapy

Sammy Fung

Mr Sammy Fung is President and Founder of Open Source Hong Kong. He establish online community of Open Source Hong Kong in 2006, and its activities in 2010. Sammy starts his contributions in open source community in 1997, he is co-founder and founding chairman of Hong Kong Linux User Group. In 2011, Sammy also participates in open source community across Asia, he joins GNOME Asia committee in 2012, and becomes first Mozilla representative for Hong Kong in 2013. Sammy is a Python developer, open source contributer, and tech writier. He is experienced in Data Science, Django, Scrapy. GitHub / Twitter: @sammyfung Affiliates: - GNOME Asia: Committee Member. - GNOME Foundation: Member. - Mozilla: Mozilla Represenative. - Hong Kong Python User Group (HKPUG): Organiser. - Python Software Foundation: Member.

Leave a Reply

Your email address will not be published. Required fields are marked *