15,024
edits
| Line 1: | Line 1: | ||
同一電腦有兩種版本的 python | 同一電腦有兩種版本的 python | ||
== 安裝兩種版本的 | == 安裝兩種版本的 Python == | ||
=== Windows === | === Windows === | ||
Windows 電腦已經安裝 | Windows 電腦已經安裝 Python2, 想要安裝 Python3 | ||
* 直接從 [https://www.python.org/downloads/ python 網站] 下載安裝 python3 即可 | * 直接從 [https://www.python.org/downloads/ python 網站] 下載安裝 python3 即可 | ||
=== Mac === | |||
因為 Mac 內建 Python2, 所以需要額外安裝 Python3 | |||
* 請參考 [http://docs.python-guide.org/en/latest/starting/install3/osx/ Installing Python 3 on Mac OS X — The Hitchhiker's Guide to Python] & [https://stringpiggy.hpd.io/mac-osx-python3-dual-install/ Mac OSX 正確地同時安裝 Python 2.7 和 Python3 – 字串小豬] | |||
=== Linux === | |||
已經安裝 Python2, 需要額外安裝 Python3 | |||
* [https://oranwind.org/python-python-an-zhuang-yu-ji-chu-jiao-xue/ CentOS 7 安裝 Python 3.6] | |||
== 確認安裝的 python 版本 == | |||
=== Windows === | |||
確認安裝版本<ref>[https://docs.python.org/3/using/windows.html#launcher 3. Using Python on Windows — Python 3.6.5 documentation]</ref> | 確認安裝版本<ref>[https://docs.python.org/3/using/windows.html#launcher 3. Using Python on Windows — Python 3.6.5 documentation]</ref> | ||
<pre> | <pre> | ||
| Line 17: | Line 28: | ||
</pre> | </pre> | ||
=== Mac === | === Mac & Linux === | ||
<pre> | <pre> | ||
$ python -V | $ python -V | ||