2015年8月25日火曜日

Macでpython3の環境構築2---python3本体のインストール---

前回「MacでPython3の環境構築1---Homebrewのインストール---」ではHomebrewをインストールしたので、次にpython3をインストールします。

とは言っても、Homebrewさえインストールしてしまえば、あとはコマンドを一回打つだけなのですが。

ターミナルを開いて、カーソルが点滅しているところに以下のように打ちます。

hiroshi-no-MacBook-Air:~ hiroshi$ brew install python3       # 「brew install python3」というコマンドを打ち、returnを押す。

そうすると、以下のような処理が走りますので、完了するまで待つだけです。
==> Installing dependencies for python3: readline, sqlite, gdbm, openssl, xz

==> Installing python3 dependency: readline

==> Downloading https://homebrew.bintray.com/bottles/readline-6.3.8.yosemite.bottle.tar.gz

######################################################################## 100.0%

==> Pouring readline-6.3.8.yosemite.bottle.tar.gz

==> Caveats

This formula is keg-only, which means 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.3.8: 40 files, 2.1M

==> Installing python3 dependency: sqlite

==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.8.11.1.yosemite.bottle.tar.gz

######################################################################## 100.0%

==> Pouring sqlite-3.8.11.1.yosemite.bottle.tar.gz

==> Caveats

This formula is keg-only, which means it was not symlinked into /usr/local.



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.11.1: 9 files, 2.8M

==> Installing python3 dependency: gdbm

==> Downloading https://homebrew.bintray.com/bottles/gdbm-1.11.yosemite.bottle.2.tar.gz

######################################################################## 100.0%

==> Pouring gdbm-1.11.yosemite.bottle.2.tar.gz

🍺  /usr/local/Cellar/gdbm/1.11: 17 files, 532K

==> Installing python3 dependency: openssl

==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2d_1.yosemite.bottle.tar.gz

######################################################################## 100.0%

==> Pouring openssl-1.0.2d_1.yosemite.bottle.tar.gz

==> Caveats

A CA file has been bootstrapped using certificates from the system

keychain. To add additional certificates, place .pem files in

  /usr/local/etc/openssl/certs



and run

  /usr/local/opt/openssl/bin/c_rehash



This formula is keg-only, which means it was not symlinked into /usr/local.



Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries



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/openssl/lib

    CPPFLAGS: -I/usr/local/opt/openssl/include



==> Summary

🍺  /usr/local/Cellar/openssl/1.0.2d_1: 464 files, 18M

==> Installing python3 dependency: xz

==> Downloading https://homebrew.bintray.com/bottles/xz-5.2.1.yosemite.bottle.tar.gz

######################################################################## 100.0%

==> Pouring xz-5.2.1.yosemite.bottle.tar.gz

🍺  /usr/local/Cellar/xz/5.2.1: 59 files, 1.7M

==> Installing python3

==> Downloading https://homebrew.bintray.com/bottles/python3-3.4.3_2.yosemite.bottle.1.tar.gz

######################################################################## 100.0%

==> Pouring python3-3.4.3_2.yosemite.bottle.1.tar.gz

==> /usr/local/Cellar/python3/3.4.3_2/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/us

==> /usr/local/Cellar/python3/3.4.3_2/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/us

==> /usr/local/Cellar/python3/3.4.3_2/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/us

==> 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



See: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Homebrew-and-Python.md



.app bundles were installed.

Run `brew linkapps python3` to symlink these to /Applications.

==> Summary

🍺  /usr/local/Cellar/python3/3.4.3_2: 4696 files, 79M

hiroshi-no-MacBook-Air:~ hiroshi$  



完了したら、念のため確認として、次のよう打つと、すでにインストールされているよ、とメッセージが出てきます。
hiroshi-no-MacBook-Air:~ hiroshi$ brew install python3
Warning: python3-3.4.3_2 already installed

以上で、とりあえずpython3本体のインストールは完了です。
例によって、また上で出てきた処理のプロセスの全文を最後にまとめておきます。

hiroshi-no-MacBook-Air:~ hiroshi$ brew install python3

==> Installing dependencies for python3: readline, sqlite, gdbm, openssl, xz

==> Installing python3 dependency: readline

==> Downloading https://homebrew.bintray.com/bottles/readline-6.3.8.yosemite.bottle.tar.gz

######################################################################## 100.0%

==> Pouring readline-6.3.8.yosemite.bottle.tar.gz

==> Caveats

This formula is keg-only, which means 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.3.8: 40 files, 2.1M

==> Installing python3 dependency: sqlite

==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.8.11.1.yosemite.bottle.tar.gz

######################################################################## 100.0%

==> Pouring sqlite-3.8.11.1.yosemite.bottle.tar.gz

==> Caveats

This formula is keg-only, which means it was not symlinked into /usr/local.



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.11.1: 9 files, 2.8M

==> Installing python3 dependency: gdbm

==> Downloading https://homebrew.bintray.com/bottles/gdbm-1.11.yosemite.bottle.2.tar.gz

######################################################################## 100.0%

==> Pouring gdbm-1.11.yosemite.bottle.2.tar.gz

🍺  /usr/local/Cellar/gdbm/1.11: 17 files, 532K

==> Installing python3 dependency: openssl

==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2d_1.yosemite.bottle.tar.gz

######################################################################## 100.0%

==> Pouring openssl-1.0.2d_1.yosemite.bottle.tar.gz

==> Caveats

A CA file has been bootstrapped using certificates from the system

keychain. To add additional certificates, place .pem files in

  /usr/local/etc/openssl/certs



and run

  /usr/local/opt/openssl/bin/c_rehash



This formula is keg-only, which means it was not symlinked into /usr/local.



Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries



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/openssl/lib

    CPPFLAGS: -I/usr/local/opt/openssl/include



==> Summary

🍺  /usr/local/Cellar/openssl/1.0.2d_1: 464 files, 18M

==> Installing python3 dependency: xz

==> Downloading https://homebrew.bintray.com/bottles/xz-5.2.1.yosemite.bottle.tar.gz

######################################################################## 100.0%

==> Pouring xz-5.2.1.yosemite.bottle.tar.gz

🍺  /usr/local/Cellar/xz/5.2.1: 59 files, 1.7M

==> Installing python3

==> Downloading https://homebrew.bintray.com/bottles/python3-3.4.3_2.yosemite.bottle.1.tar.gz

######################################################################## 100.0%

==> Pouring python3-3.4.3_2.yosemite.bottle.1.tar.gz

==> /usr/local/Cellar/python3/3.4.3_2/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/us

==> /usr/local/Cellar/python3/3.4.3_2/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/us

==> /usr/local/Cellar/python3/3.4.3_2/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/us

==> 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



See: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Homebrew-and-Python.md



.app bundles were installed.

Run `brew linkapps python3` to symlink these to /Applications.

==> Summary

🍺  /usr/local/Cellar/python3/3.4.3_2: 4696 files, 79M

hiroshi-no-MacBook-Air:~ hiroshi$ brew install python3
Warning: python3-3.4.3_2 already installed


0 件のコメント:

コメントを投稿