Python Boot CampテキストをUbuntu 16.04 LTSで試す

#kagolug 2017.10で告知のあった「Python Boot Camp in 鹿児島」で使う「Python Boot Campテキスト」を見るとLinuxはUbuntu 17.04 serverがターゲットになっている

1. Pythonをはじめる前に — Python Boot Camp Text 2016.04.28 ドキュメント 🏛️

1.3.3. Linux (Ubuntu Server) での場合
ここではLinuxとしてUbuntu 17.04にPython3.6をインストールする方法を説明します。

LTSのDesktop使いたい人も居るだろうなとUbuntu 16.04 LTS arm64で一通り確認してみた

「1.3.3. Linux (Ubuntu Server) での場合」のPython導入は以下のように3.5に変更

$ sudo apt update && sudo apt upgrade -y
$ sudo apt -y install python3.5 python3.5-dev python3.5-venv
$ python3.5 -V
Python 3.5.2

「5.1.2. ファイルへの書き込み」でファイルの確認前にflushしないとファイルが空

>>> f.flush()

「5.1.5. 追記モードでの書き込み」でファイルの確認前にflushしないとファイルが更新されない

>>> f.flush()

後は問題無さそう

Debianの場合もstable(stretch)では同じだと思う.Python 3.6はtesting(Buster)以降になるみたい(未確認)

このチュートリアルはBeautifulSoupまでやるので例えばcalibrでニュースサイトをスクレイピングしてKindleに自動転送といったようなレシピも書けるようになりますね :)

コメントを残す

メールアドレスが公開されることはありません。 ※ が付いている欄は必須項目です

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.