0
0

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.

Chromebookのlinux(Debian)に最新版のPythonを入れる

Posted at

Debianのバージョンは以下

aaaa@penguin:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.12 (stretch)
Release:        9.12
Codename:       stretch

デフォルトでPython3.5が入っている。

aaaa@penguin:~$ python3 -V
Python 3.5.3

が最新バージョンのPythonも使いたかったので以下の手順で導入した。

現時点(2020/03)では3.8.2が最新
https://www.python.org/downloads/release/python-382/
上記ページからソースを落としてビルドする
(Files > Gzipped source tarball のリンクをwget)

aaaa@penguin:~$ cd /usr/local/src
aaaa@penguin:~$ wget https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tgz
aaaa@penguin:~$ sudo tar zxvf Python-3.8.2.tgz

ビルド
※既存のpython3.6を上書きされないようにmake altinstallを実施する

aaaa@penguin:~$ cd  Python-3.8.2
aaaa@penguin:~$ ./configure
aaaa@penguin:~$ make
aaaa@penguin:~$ make altinstall

入った

aaaapenguin:~$ python3.8 -V
Python 3.8.2
aaaa@penguin:~$ pip3 -V
pip 20.0.2 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?