6
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Ubuntu 18.04 に Python3.7を入れる

Last updated at Posted at 2019-12-13

理由とか

  • Ubuntu 18 .04 は Python 3.6.9が入ってた
  • デプロイしたら一部のTypeHintやら、dataclassでエラーに
  • 標準のaptに3.7がいるので、入れてalternativesという王道
  • 複数端末使う予定なので、Ansibleで出来るか確認したら追記するかも

コマンド

sudo apt install python3.7 -y

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2

sudo update-alternatives --config python3

確認

python3 -Vすると、3.7.5が帰ってくるはず。
さ、またwheel作らなきゃ……

6
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?