Python3のインストール
homebrewに続いて、Python3をインストールする。
他のパッケージに関する
ore-no-MacBook-Air:dev ore$ brew install python3 ==> Installing dependencies for python3: pkg-config, readline, sqlite, gd ==> Installing python3 dependency: pkg-config ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pkg-config- ######################################################################## 100.0% ==> Pouring pkg-config-0.28.mountain_lion.bottle.2.tar.gz 🍺 /usr/local/Cellar/pkg-config/0.28: 10 files, 644K ==> Installing python3 dependency: readline ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/readline-6. ######################################################################## 100.0% ==> Pouring readline-6.2.4.mountain_lion.bottle.2.tar.gz ==> Caveats This formula is keg-only, so it was not symlinked into /usr/local. OS X provides the BSD libedit library, which shadows libreadline. In order to prevent conflicts when programs look for libreadline we are defaulting this GNU Readline installation to keg-only. Generally there are no consequences of this for you. If you build your own software and it requires this formula, you'll need to add to your build variables: LDFLAGS: -L/usr/local/opt/readline/lib CPPFLAGS: -I/usr/local/opt/readline/include ==> Summary 🍺 /usr/local/Cellar/readline/6.2.4: 31 files, 1.6M ==> Installing python3 dependency: sqlite ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/sqlite-3.8. ######################################################################## 100.0% ==> Pouring sqlite-3.8.2.mountain_lion.bottle.tar.gz ==> Caveats This formula is keg-only, so it was not symlinked into /usr/local. Mac OS X already provides this software and installing another version in parallel can cause all kinds of trouble. OS X provides an older sqlite3. Generally there are no consequences of this for you. If you build your own software and it requires this formula, you'll need to add to your build variables: LDFLAGS: -L/usr/local/opt/sqlite/lib CPPFLAGS: -I/usr/local/opt/sqlite/include ==> Summary 🍺 /usr/local/Cellar/sqlite/3.8.2: 9 files, 2.0M ==> Installing python3 dependency: gdbm ==> Downloading http://ftpmirror.gnu.org/gdbm/gdbm-1.11.tar.gz ######################################################################## 100.0% ==> ./configure --prefix=/usr/local/Cellar/gdbm/1.11 --mandir=/usr/local/Cellar/ ==> make install 🍺 /usr/local/Cellar/gdbm/1.11: 16 files, 420K, built in 25 seconds ==> Installing python3 dependency: xz ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/xz-5.0.5.mo ######################################################################## 100.0% ==> Pouring xz-5.0.5.mountain_lion.bottle.2.tar.gz 🍺 /usr/local/Cellar/xz/5.0.5: 58 files, 1.5M ==> Installing python3 ==> Downloading http://python.org/ftp/python/3.3.3/Python-3.3.3.tar.bz2 ######################################################################## 100.0% ==> ./configure --prefix=/usr/local/Cellar/python3/3.3.3 --enable-ipv6 --dataroo ==> make ==> make install PYTHONAPPSDIR=/usr/local/Cellar/python3/3.3.3 ==> make frameworkinstallextras PYTHONAPPSDIR=/usr/local/Cellar/python3/3.3.3/sh ==> Downloading https://pypi.python.org/packages/source/s/setuptools/setuptools- ######################################################################## 100.0% ==> /usr/local/Cellar/python3/3.3.3/bin/python3.3 -s setup.py install --force -- ==> Downloading https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz ######################################################################## 100.0% ==> /usr/local/Cellar/python3/3.3.3/bin/python3.3 -s setup.py install --force -- ==> Caveats Setuptools and Pip have been installed. To update them pip3 install --upgrade setuptools pip3 install --upgrade pip To symlink "Idle 3" and the "Python Launcher 3" to ~/Applications `brew linkapps` You can install Python packages with `pip3 install <your_favorite_package>` They will install into the site-package directory /usr/local/lib/python3.3/site-packages See: https://github.com/Homebrew/homebrew/wiki/Homebrew-and-Python ==> Summary 🍺 /usr/local/Cellar/python3/3.3.3: 4725 files, 93M, built in 4.4 minutes ore-no-MacBook-Air:dev ore $ ore-no-MacBook-Air:dev ore $ brew install python3 -bash: ore-no-MacBook-Air:dev: command not found ore-no-MacBook-Air:dev ore $ ==> Installing dependencies for python3: pkg-config, readline, sqlite, gd -bash: ==: command not found ore-no-MacBook-Air:dev ore $ ==> Installing python3 dependency: pkg-config -bash: ==: command not found ore-no-MacBook-Air:dev ore $ ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pkg-config- -bash: ==: command not found ore-no-MacBook-Air:dev ore$ ######################################################################## 100.0% ore-no-MacBook-Air:dev ore $ ==> Pouring pkg-config-0.28.mountain_lion.bottle.2.tar.gz -bash: ==: command not found ore-no-MacBook-Air:dev ore $ 🍺 /usr/local/Cellar/pkg-config/0.28: 10 files, 644K -bash: 🍺: command not found ore-no-MacBook-Air:dev ore $ ==> Installing python3 dependency: readline -bash: ==: command not found ore-no-MacBook-Air:dev ore $ ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/readline-6. -bash: ==: command not found ore-no-MacBook-Air:dev ore $ ######################################################################## 100.0% ore-no-MacBook-Air:dev ore $ ==> Pouring readline-6.2.4.mountain_lion.bottle.2.tar.gz -bash: ==: command not found ore-no-MacBook-Air:dev ore $ ==> Caveats -bash: ==: command not found ore-no-MacBook-Air:dev ore $ This formula is keg-only, so it was not symlinked into /usr/local. -bash: This: command not found
"command not found"というメッセージがたくさん出ているのがちょっと気になるけど、もう一度installしてみるとインストール自体はできてるみたい。
ore-no-MacBook-Air:dev ore$ brew install python3 Warning: python3-3.3.3 already installed
と思ったら、python3とコマンド打っても反応しない。
一旦、uninstallしてもう一度installし直すことにする。
ore-no-MacBook-Air:dev ore$ brew uninstall python3 Uninstalling /usr/local/Cellar/python3/3.3.3... ore-no-MacBook-Air:dev ore$ brew install python3 ==> Downloading http://python.org/ftp/python/3.3.3/Python-3.3.3.tar.bz2 Already downloaded: /Library/Caches/Homebrew/python3-3.3.3.tar.bz2 ==> ./configure --prefix=/usr/local/Cellar/python3/3.3.3 --enable-ipv6 --dataroo ==> make ==> make install PYTHONAPPSDIR=/usr/local/Cellar/python3/3.3.3 ==> make frameworkinstallextras PYTHONAPPSDIR=/usr/local/Cellar/python3/3.3.3/sh ==> Downloading https://pypi.python.org/packages/source/s/setuptools/setuptools- Already downloaded: /Library/Caches/Homebrew/python3--setuptools-2.0.1.tar.gz ==> /usr/local/Cellar/python3/3.3.3/bin/python3.3 -s setup.py install --force -- ==> Downloading https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz Already downloaded: /Library/Caches/Homebrew/python3--pip-1.4.1.tar.gz ==> /usr/local/Cellar/python3/3.3.3/bin/python3.3 -s setup.py install --force -- ==> Caveats Setuptools and Pip have been installed. To update them pip3 install --upgrade setuptools pip3 install --upgrade pip To symlink "Idle 3" and the "Python Launcher 3" to ~/Applications `brew linkapps` You can install Python packages with `pip3 install <your_favorite_package>` They will install into the site-package directory /usr/local/lib/python3.3/site-packages See: https://github.com/Homebrew/homebrew/wiki/Homebrew-and-Python ==> Summary 🍺 /usr/local/Cellar/python3/3.3.3: 4725 files, 93M, built in 2.1 minutes
今度は大丈夫みたい。どうやら、並行して行っていたXcodeでのComandLineToolsのインストールが終わってなかったのが原因のよう。
ore-no-MacBook-Air:dev ore$ python3 Python 3.3.3 (default, Jan 2 2014, 22:58:28) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>>