# 安裝 Python3
> 原文: [https://thepythonguru.com/installing-python3/](https://thepythonguru.com/installing-python3/)
* * *
于 2020 年 1 月 7 日更新
* * *
本教程重點介紹 Python3。大多數 Linux 發行版,例如 Ubuntu 14.04,都安裝了 python 2 和 3,這是下載鏈接。 如果您使用其他 Linux 發行版,請參閱此鏈接以獲取安裝說明。 Mac 還隨附安裝了 python 2 和 python 3(如果未查看此鏈接以獲取說明),但 Windows 并非如此。
**注意**:
注意:在本教程中,我將僅在 Windows 和 Ubuntu 14.04 上提供必要的說明。
## 在 Windows 中安裝 Python 3
* * *
要安裝 python,您需要從 [https://www.python.org/downloads/](https://www.python.org/downloads/) 下載 python 二進制文件,特別是我們將使用 python 3.4.3,您可以在此處從[下載](https://www.python.org/downloads/release/python-343/) 。 安裝時,請記住檢查“將`Python.exe`添加到路徑”(請參見下圖)。

現在您已經安裝了 python,打開命令提示符或終端并輸入`python`。 現在您在 python shell 中。

要測試一切正常,請在 python shell 中鍵入以下命令。
```py
print("Hello World")
```

**預期輸出**:
```py
Hello World
```
如果您使用的是已隨附 python 2 和 python 3 的 Ubuntu 14.04,則需要輸入`python3`而不是僅`python`才能輸入 python 3 shell。

安裝文本編輯器要編寫 python 程序,您將需要一個文本編輯器,您可以使用文本編輯器(如記事本)。 如果要使用完整的文本編輯器,請使用 Notepad++ 或 SublimeText。 下載并安裝您選擇的文本編輯器。
現在您已經成功安裝了 python 3 和文本編輯器,并準備繼續進行下一章,在此我們將學習運行 python 程序的不同方法。
* * *
* * *
- 初級 Python
- python 入門
- 安裝 Python3
- 運行 python 程序
- 數據類型和變量
- Python 數字
- Python 字符串
- Python 列表
- Python 字典
- Python 元組
- 數據類型轉換
- Python 控制語句
- Python 函數
- Python 循環
- Python 數學函數
- Python 生成隨機數
- Python 文件處理
- Python 對象和類
- Python 運算符重載
- Python 繼承與多態
- Python 異常處理
- Python 模塊
- 高級 Python
- Python *args和**kwargs
- Python 生成器
- Python 正則表達式
- 使用 PIP 在 python 中安裝包
- Python virtualenv指南
- Python 遞歸函數
- __name__ == "__main__"是什么?
- Python Lambda 函數
- Python 字符串格式化
- Python 內置函數和方法
- Python abs()函數
- Python bin()函數
- Python id()函數
- Python map()函數
- Python zip()函數
- Python filter()函數
- Python reduce()函數
- Python sorted()函數
- Python enumerate()函數
- Python reversed()函數
- Python range()函數
- Python sum()函數
- Python max()函數
- Python min()函數
- Python eval()函數
- Python len()函數
- Python ord()函數
- Python chr()函數
- Python any()函數
- Python all()函數
- Python globals()函數
- Python locals()函數
- 數據庫訪問
- 安裝 Python MySQLdb
- 連接到數據庫
- MySQLdb 獲取結果
- 插入行
- 處理錯誤
- 使用fetchone()和fetchmany()獲取記錄
- 常見做法
- Python:如何讀取和寫入文件
- Python:如何讀取和寫入 CSV 文件
- 用 Python 讀寫 JSON
- 用 Python 轉儲對象