その他/MacでPython 3を使う のバックアップの現在との差分(No.2)


  • 追加された行はこの色です。
  • 削除された行はこの色です。
#freeze
*はじめに [#c53d51a5]

Python 3をソースコードからMacのOS X (Mountain Lion) にインストールする方法です.

以下の環境で確認しました.
-OS X 10.8.2 (Mountain Lion)
-Python 3.3.0


*必要なもの [#x5e0ad6d]

-Xcode
-Xcode command line tools


*ダウンロード [#g3904185]

Pythonの公式サイトからソースコードをダウンロードします.
-[[http://www.python.org]]
-http://www.python.org


*インストール [#j916b7db]

ダウンロードしたファイルを展開したディレクトリーで次のように実行します.
#geshi(sh){{
./configure
make
make test
sudo make install
}}

ちなみに,make testしたときに次のようなエラーが出ましたが,無視しました.
#geshi(sh){{
FAILED (failures=1, skipped=1)
test test_urllib2net failed
make: *** [test] Error 1
}}


*動作確認 [#a59ca289]
#geshi(sh){{
python3
Python 3.3.0 (default, Nov 19 2012, 16:46:29) 
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>
}}

----
*インストーラーを使ってインストールする [#e0f3c795]

以下は,以前にPython 3をOS X用のインストーラを使ってインストールしたときの記事です.

この内容は,Mac OS X 10.7.4とPython 3.2.3で確認しました.


*必要なもの [#ja899af4]

とくになし.


*ダウンロード [#l507d756]

Pythonの公式サイトからPython 3.2.3 Mac OS X 64-bit/32-bit x86-64/i386 Installerをダウンロードします.
-http://www.python.org/download/


*インストール [#f2b44fb7]

ダウンロードしたディスク・イメージをダブル・クリックしてマウントし,インストーラーを起動するだけです.


*動作確認 [#vb76c4af]

ターミナルでPython 3を起動します.
#geshi(sh){{
$ python3
Python 3.2.3 (v3.2.3:3d0686d90f55, Apr 10 2012, 11:25:50) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 
}}


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS