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に自動転送といったようなレシピも書けるようになりますね :)

コメントを残す

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

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)