這是歷史版本頁面 — 看 Python (64-bit) 最新版本

想學寫程式或自動化工作,Python 能幫你做什麼

Python (64-bit) 軟體圖示 Python (64-bit) 3.3.2 (64-bit) 資料更新 2013-05-16 閱讀約 6 分鐘

你手上有一堆重複的檔案要整理,或是一份好幾萬列的資料表,Excel 開起來就卡住,你想找個方法把這些事情交給電腦自己跑。又或者,你一直想學寫程式,但打開教學文章看到一堆看不懂的專有名詞,不確定自己到底該從哪裡開始,也不確定學了之後到底能拿來做什麼。

你大概聽過「寫程式可以解決很多問題」,但真的打開編輯器,卻不知道第一行要打什麼。上網找答案,有人說要先學 C、有人說要學 JavaScript,還有人說直接學 Python 最快。你需要的不是更多選擇,而是一個能讓你實際動手、做完一件小事的工具,然後從那裡慢慢長出能力。

01Python 到底能拿來做什麼?

官方說明指出,Python 是動態物件導向程式語言,可用於多種軟體開發,包括網頁開發、資料分析、科學計算、人工智慧、機器學習和自動化。標準函式庫支援 HTML、XML、JSON、Email 處理、FTP、IMAP 等網路協定,還有 pip 套件管理器可安裝第三方模組。具體能做什麼,取決於你安裝了哪些函式庫。

02它學起來會不會很難?

官方資料說它的語法簡潔直觀,縮排結構強制程式碼可讀性,初學者能在幾天內學會基本概念。動態型別讓變數不需要宣告型別,加快開發速度。但這不代表完全沒有學習曲線,物件導向、例外處理、套件管理這些概念還是需要時間熟悉。如果你完全沒寫過程式,建議先從官方教學文件開始。

03它能寫網頁或手機App嗎?

網頁可以。官方資料提到 Django 和 Flask 兩個網頁框架,能簡化網頁開發並建立可擴充的應用程式。手機 App 方面,官方資料沒有提到相關框架或工具,需要自行確認是否有對應的解決方案。如果你主要目標是手機 App,可能需要考慮其他語言或工具。

04它能處理大量資料或做數據分析嗎?

可以。官方資料列出 NumPy 做科學計算、Pandas 做資料操作、Matplotlib 做資料視覺化,這些是資料分析常用的函式庫。TensorFlow 和 PyTorch 則用於機器學習。這些函式庫能大幅加速開發,不用從零開始寫演算法。但要注意,這些都是第三方套件,需要另外安裝。

05它能自動化重複性的工作嗎?

可以。官方資料提到 Python 可用於自動化,且標準函式庫支援多種網路協定,例如用 FTP 或 IMAP 處理檔案傳輸和郵件。配合第三方套件如 Requests(HTTP 客戶端)、BeautifulSoup(HTML 解析),可以寫腳本自動抓取網頁資料或處理檔案。具體能自動化什麼,取決於你安裝的套件。

06完全沒寫過程式的人適合學嗎?

官方資料說 Python 常被用作高中和大學的入門程式語言,因為語法簡單、容易學習。它強調程式碼可讀性,縮排結構能減少語法錯誤。但「適合初學者」不代表不用花時間,還是需要投入時間練習。如果你完全沒接觸過程式,可以先從官方教學文件開始。

07我已經會寫C或Java,還需要學它嗎?

官方資料說 Python 可以與 C、C++、Java 整合,也能嵌入其他應用程式當作腳本介面。如果你已經有程式基礎,Python 的語法會更容易上手,而且可以用來快速開發原型。但如果你現有的語言已經能解決問題,就不一定要換。Python 的優勢在於開發速度和生態系,不是取代其他語言。

08我的電腦是Windows 7,可以用嗎?

要注意。官方資料明確說 Python 3.9 以上的版本不能在 Windows 7 或更早的系統上執行。如果你還在用 Windows 7,只能安裝 3.8 或更早的版本,但那些版本可能不再獲得更新。建議先確認你的系統版本,再決定要安裝哪個版本。Windows 8、10、11 則沒有這個限制。

09我不喜歡打指令,只想要圖形介面,適合嗎?

官方資料說 Python 本身是命令列語言,沒有專屬的圖形使用者介面。但可以搭配 PyCharm、Visual Studio Code、Atom、Jupyter Notebook 等 IDE 或編輯器,這些工具提供程式碼自動完成、語法標示、除錯功能。如果你完全不想碰指令列,還是需要透過這些工具來操作。

10我想寫一個執行速度很快的程式,適合嗎?

官方資料沒有提到 Python 的執行效能。它是直譯式語言,通常比編譯式語言慢,但資料沒有提供具體數據。如果你的程式需要極高效能,可能需要考慮其他語言,或把效能關鍵的部分用 C/C++ 撰寫再整合。這部分需要你自己測試評估。

11我想開發手機App,適合嗎?

官方資料沒有提到手機 App 開發的相關框架或工具。Python 主要用於網頁、資料分析、科學計算、自動化等領域。如果你要開發手機 App,可能需要找其他語言或工具,或確認是否有第三方套件能達成。資料沒有這方面的資訊,建議先確認你的需求再決定。

12它需要付費嗎?

官方資料說 Python 64-bit 採用 OSI 認可的開源授權,可以免費使用,包括商業產品。不需要付費購買授權。但如果你要使用某些第三方套件,那些套件可能有自己的授權條款,需要個別確認。官方網站提供各作業系統的安裝檔,下載和安裝都是免費的。

下載與官方連結

前往官方網站 下載 Python (64-bit)

python-3.3.2.amd64.msi · 19.8 MB · 連結指向軟體原廠

版本紀錄

再看 5 筆

看完整版本清單

這一版改了什麼

What's new in this version:

Core and Builtins:
- Issue #17237: Fix crash in the ASCII decoder on m68k.
- Issue #17408: Avoid using an obsolete instance of the copyreg module when the interpreter is shutdown and then started again.
- Issue #17863: In the interactive console, don’t loop forever if the encoding can’t be fetched from stdin.
- Issue #17867: Raise an ImportError if __import__ is not found in __builtins__.
- Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3, such as was shipped with Centos 5 and Mac OS X 10.4.
- Issue #17413: sys.settrace callbacks were being passed a string instead of an exception instance for the ‘value’ element of the arg tuple if the exception originated from C code; now an exception instance is always provided.
- Issue #17782: Fix undefined behaviour on platforms where struct timespec‘s “tv_nsec” member is not a C long.
- Issue #17715: Fix segmentation fault from raising an exception in a __trunc__ method.
- Issue #16447: Fixed potential segmentation fault when setting __name__ on a class.
- Issue #17669: Fix crash involving finalization of generators using yield from.
- Issue #17619: Make input() check for Ctrl-C correctly on Windows.
- Issue #17610: Don’t rely on non-standard behavior of the C qsort() function.
- Issue #17357: Add missing verbosity output when using -v/-vv.

Library:
- Issue #17606: Fixed support of encoded byte strings in the XMLGenerator
- .characters() and ignorableWhitespace() methods. Original patch by Sebastian
- Ortiz Vasquez.
- Issue #17732: Ignore distutils.cfg options pertaining to install paths if a virtual environment is active.
- Issue #1159051: Back out a fix for handling corrupted gzip files that broke backwards compatibility.
- Issue #17915: Fix interoperability of xml.sax with file objects returned by codecs.open().
- Issue #16601: Restarting iteration over tarfile no more continues from where it left off. Patch by Michael Birtwell.
- Issue #17289: The readline module now plays nicer with external modules or applications changing the rl_completer_word_break_characters global variable. Initial patch by Bradley Froehle.
- Issue #12181: select module: Fix struct kevent definition on OpenBSD 64-bit platforms. Patch by Federico Schwindt.
- Issue #14173: Avoid crashing when reading a signal handler during interpreter shutdown.
- Issue #16316: mimetypes now recognizes the .xz and .txz (.tar.xz) extensions.
- Issue #15902: Fix imp.load_module() accepting None as a file when loading an extension module.
- Issue #17802: Fix an UnboundLocalError in html.parser. Initial tests by Thomas Barlow.
- Issue #15535: Fix namedtuple pickles which were picking up the OrderedDict instead of just the underlying tuple.
- Issue #17192: Restore the patch for Issue #11729 which was ommitted in 3.3.1 when updating the bundled version of libffi used by ctypes. Update many libffi files that were missed in 3.3.1’s update to libffi-3.0.13.
- Issue #17358: Modules loaded by imp.load_source() and load_compiled() (and by extention load_module()) now have a better chance of working when reloaded.
- Issue #17353: Plistlib emitted empty data tags with deeply nested datastructures
- Issue #11714: Use ‘with’ statements to assure a Semaphore releases a condition variable. Original patch by Thomas Rachel.
- Issue #17795: Reverted backwards-incompatible change in SysLogHandler with Unix domain sockets.
- Issue #17555: Fix ForkAwareThreadLock so that size of after fork registry does not grow exponentially with generation of process.
- Issue #17707: multiprocessing.Queue’s get() method does not block for short timeouts.
- Isuse #17720: Fix the Python implementation of pickle.Unpickler to correctly process the APPENDS opcode when it is used on non-list objects.
- Issue #17012: shutil.which() no longer fallbacks to the PATH environment variable if empty path argument is specified. Patch by Serhiy Storchaka.
- Issue #17710: Fix pickle raising a SystemError on bogus input.
- Issue #17341: Include the invalid name in the error messages from re about invalid group names.
- Issue #17702: os.environ now raises KeyError with the original environment variable name (str on UNIX), instead of using the encoded name (bytes on UNIX).
- Issue #16163: Make the importlib based version of pkgutil.iter_importers work for submodules. Initial patch by Berker Peksag.
- Issue #16804: Fix a bug in the ‘site’ module that caused running ‘python -S -m site’ to incorrectly throw an exception.
- Issue #17016: Get rid of possible pointer wraparounds and integer overflows in the re module. Patch by Nickolai Zeldovich.
- Issue #16658: add missing return to HTTPConnection.send() Patch by Jeff Knupp.
- Issue #14971: unittest test discovery no longer gets confused when a function has a different __name__ than its name in the TestCase class dictionary.
- Issue #17678: Fix DeprecationWarning in the http/cookiejar.py by changing the usage of get_origin_req_host() to origin_req_host.
- Issue #17666: Fix reading gzip files with an extra field.
- Issue #17502: Process DEFAULT values in mock side_effect that returns iterator. Patch by Michael Foord.
- Issue #17572: Avoid chained exceptions while passing bad directives to time.strptime(). Initial patch by Claudiu Popa.
- Issue #17435: threading.Timer’s __init__ method no longer uses mutable default values for the args and kwargs parameters.
- Issue #17526: fix an IndexError raised while passing code without filename to inspect.findsource(). Initial patch by Tyler Doyle.
- Issue #16550: Update the opcode descriptions of pickletools to use unsigned integers where appropriate. Initial patch by Serhiy Storchaka.

IDLE:
- Issue #17838: Allow sys.stdin to be reassigned.
- Issue #13495: Avoid loading the color delegator twice in IDLE.
- Issue #17798: Allow IDLE to edit new files when specified on command line.
- Issue #14735: Update IDLE docs to omit “Control-z on Windows”.
- Issue #17585: Fixed IDLE regression. Now closes when using exit() or quit().
- Issue #17657: Show full Tk version in IDLE’s about dialog. Patch by Todd Rovito.
- Issue #17613: Prevent traceback when removing syntax colorizer in IDLE.
- Issue #1207589: Backwards-compatibility patch for right-click menu in IDLE.
- Issue #16887: IDLE now accepts Cancel in tabify/untabify dialog box.
- Issue #17625: In IDLE, close the replace dialog after it is used.
- Issue #14254: IDLE now handles readline correctly across shell restarts.
- Issue #17614: IDLE no longer raises exception when quickly closing a file.
- Issue #6698: IDLE now opens just an editor window when configured to do so.
- Issue #8900: Using keyboard shortcuts in IDLE to open a file no longer raises an exception.
- Issue #6649: Fixed missing exit status in IDLE. Patch by Guilherme Polo.

Tests:
- Issue #17833: Fix test_gdb failures seen on machines where debug symbols for glibc are available (seen on PPC64 Linux).
- Issue #7855: Add tests for ctypes/winreg for issues found in IronPython. Initial patch by Dino Viehland.
- Issue #17712: Fix test_gdb failures on Ubuntu 13.04.
- Issue #17835: Fix test_io when the default OS pipe buffer size is larger than one million bytes.
- Issue #17065: Use process-unique key for winreg tests to avoid failures if test is run multiple times in parallel (eg: on a buildbot host).
- Issue #12820: add tests for the xml.dom.minicompat module. Patch by John Chandler and Phil Connell.
- Issue #17790: test_set now works with unittest test discovery. Patch by Zachary Ware.
- Issue #17789: test_random now works with unittest test discovery. Patch by Zachary Ware.
- Issue #17779: test_osx_env now works with unittest test discovery. Patch by Zachary Ware.
- Issue #17766: test_iterlen now works with unittest test discovery. Patch by Zachary Ware.
- Issue #17690: test_time now works with unittest test discovery. Patch by Zachary Ware.
- Issue #17692: test_sqlite now works with unittest test discovery. Patch by Zachary Ware.
- Issue #17843: Removed bz2 test data file that was triggering false-positive virus warnings with certain antivirus software.

Documentation:
- Issue #15940: Specify effect of locale on time functions.
- Issue #6696: add documentation for the Profile objects, and improve profile/cProfile docs. Patch by Tom Pinckney.
- Issue #17915: Fix interoperability of xml.sax with file objects returned by codecs.open().

Build:
- Issue #17547: In configure, explicitly pass -Wformat for the benefit for GCC 4.8.
- Issue #17962: Build with OpenSSL 1.0.1e on Windows.