Skip to content

Commit 8cdb25e

Browse files
committed
Pythonのバージョン確認方法についての説明を更新
1 parent e7d963f commit 8cdb25e

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed
Loading
Loading

source/python-setup/start-up-and-interpreter.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@ Finderを起動し、「アプリケーション」-「ユーティリティ」
1616
![ターミナルを起動](./images/run-python-for-mac-2.png)
1717
*ターミナルを起動*
1818

19-
ターミナル上で以下のコマンドを入力すると、インストールされたPythonのバージョンを確認できます。
19+
ターミナル上で`$`より右に`python{バージョン番号} -V`というコマンドを入力すると、インストールされたPythonのバージョンを確認できます。
20+
たとえば、Python 3.9がインストールされている場合は`python3.9 -V`と入力します。
2021

21-
```console
22-
$ python3.9 -V
23-
Python 3.9.7
24-
```
22+
![インストールされたPythonのバージョンを確認](./images/show-python-version-for-mac.png)
23+
*インストールされたPythonのバージョンを確認*
2524

2625
このとき、`python -V`のようにpythonコマンドの後ろの数字を省略しないでください。
2726
macOSにはデフォルトでPython 2.7系がインストールされているため、このコマンドではインストールしたものとは別のPythonが起動されてしまいます。
@@ -37,12 +36,10 @@ macOSにはデフォルトでPython 2.7系がインストールされている
3736
![スタートボタンからWindows PowerShellを起動](./images/run-python-for-win-2.png)
3837
*スタートボタンからWindows PowerShellを起動*
3938

40-
ターミナル上で以下のコマンドを入力すると、インストールされたPythonのバージョンを確認できます。
39+
ターミナル上で`>`より右に`python -V`というコマンドを入力すると、インストールされたPythonのバージョンを確認できます。
4140

42-
```console
43-
PS C:\Users\**** python -V
44-
Python 3.9.7
45-
```
41+
![インストールされたPythonのバージョンを確認](./images/show-python-version-for-win.png)
42+
*インストールされたPythonのバージョンを確認*
4643

4744
## Pythonの対話モード
4845

0 commit comments

Comments
 (0)