1. 程式人生 > >使用 python3 環境開發。

使用 python3 環境開發。

  • 安裝python3 環境

$ brew install python3


/usr/local/Cellar/python3/3.4.3/bin/python3

==> Pouring python3-3.4.3.yosemite.bottle.10.tar.gz
==> Caveats
Pip and setuptools have been installed. To update them
pip3 install –upgrade pip setuptools

You can install Python packages with
pip3 install

They will install into the site-package directory
/usr/local/lib/python3.4/site-packages

.app bundles were installed.
Run brew linkapps python3 to symlink these to /Applications.
==> /usr/local/Cellar/python3/3.4.3/bin/python3 -s setup.py –no-user-cfg instal
==> /usr/local/Cellar/python3/3.4.3/bin/python3 -s setup.py –no-user-cfg instal
==> Summary
�� /usr/local/Cellar/python3/3.4.3: 4643 files, 81M

  • 基於 python3 建立virtualenv

$ virtualenv -p /usr/local/Cellar/python3/3.4.3/bin/python3 py3env

擴充套件閱讀: