留下快樂和驚喜 與過去近一點

星期二, 9月 15, 2015

Python 3.5.0 入門

在 windows 的環境下,python 是需要安裝,而在 Mac 和 Unix 的環境是內建的。

第一步: 在 Windows 安裝 python

Python 的安裝檔可以在官網 (https://www.python.org/) 下載,目前最新的穩定版本為 3.5.0。由於本人的電腦環境為 32bit 的 windows10,所以下載 "Python 3.5.0 - 2015-09-13 - Windows x86 executable installer"。




下圖是 3.5.0 的安裝畫面,記得勾選 "Add Python 3.5 to PATH" ,以後開啟 python 會方便一點。
python 3.5.0 安裝畫面

安裝完成的畫面
安裝完成的畫面

如果安裝成功,可以在 windows cmd 裡開啟 python 直譯器 或 在開始功能表中開啟python。
Windows cmd 開啟 python 方法

第二步: Hello World
Python 的 "Hello World" 例子真是十分簡單。
Print('Hello World')
Hello World 語句

Python 的第一段程式已經完成。今天到此為止了,往後還會有其他的 python 用法,再見。

Related Posts:

  • Python 3.5.0 入門 在 windows 的環境下,python 是需要安裝,而在 Mac 和 Unix 的環境是內建的。 第一步: 在 Windows 安裝 python Python 的安裝檔可以在官網 (https://www.python.org/) 下載,目前最新的穩定版本為 3.5.0。由於本人的電腦環境為 32bit 的 windows10,所以下載 "Python 3.5.0 - 2015-09-13 - Windows x86 execut… Read More
  • 使用 notepad++ 執行 python 程式碼 Notepad++ 是一個輕巧的文本編輯器,如果編寫簡單的程式,可以作為入門,嘗試開始寫自己的程式碼。 這裏建議幾個方法在 Notepad++ 中執行 Python。 方法一: 安裝Notepad++ 的 Plugins "NppExec" 開啟 Notepad++ → 在選單點選 "Plugins" → "Plugin Manager" → "Show Plugin Manager" 在彈出的對話框中找尋 "NppExec" 外掛 → … Read More
  • Python 3.5.0 urllib 用法在網上搜索使用Python語言的網絡爬蟲(Crawler)程式碼時,經常會出現導入(import) "urllib" 及 "urllib2" 模組(module)的程式碼。 但是在 Python 3.X 的版本中,將 "urllib" 和 "urllib2" 模組合併為 "urllib" 下的模組,分別是"urllib.error","urllib.request","urllib.response",還有 "urllib.parse" 及 … Read More

0 意見:

發佈留言

Copyright © 2025 Matt Ko in UK 旅英紀錄 | Powered by Blogger

Design by Matthew Ko | Blogger Theme by NewBloggerThemes.com