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 1 year has passed since last update.

ラズパイをpython2からpython3に変更する方法

Last updated at Posted at 2023-01-16

(1)pythonのバージョンを確認

*現在のバージョンはpython2系であることを確認

$ python -V
python2.7.0

(2)シンボリックリンク確認

$ cd /usr/bin
$ ls -l | grep python
rwxrwxrwx 1 root root     10 Oct 4  2022 python -> python2

(3)シンボリックリンク削除

$ cd /usr/bin
$ sudo unlink python

(4)シンボリックリンク作成

$ cd /usr/bin
$ sudo ln -s pytohn3 python

(5)再度シンボリックリンク確認

$ cd /usr/bin
$ ls -l | grep python
rwxrwxrwx 1 root root     10 Oct 4  2022 python -> python3

(6)再度pythonのバージョンを確認

*変更後のバージョンはpython3系であることを確認

$ python -V
python3.7.0
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?