Thursday, March 12, 2015

How to install Python3 with brew(mac)

$brew install python3

You will see below process:
==> Installing dependencies for python3: xz, pkg-config, readline, sqlite, gdbm, openssl
==> 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 dependency: pkg-config
==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.28.yosemite.bottle.2.tar.gz
######################################################################## 100.0%
==> Pouring pkg-config-0.28.yosemite.bottle.2.tar.gz
🍺  /usr/local/Cellar/pkg-config/0.28: 10 files, 612K
==> 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.

Mac OS X provides similar software, and installing this software in
parallel can cause all kinds of trouble.

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.8.3.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring sqlite-3.8.8.3.yosemite.bottle.tar.gz
==> Caveats
This formula is keg-only, which means 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.8.3: 9 files, 2.1M
==> 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.2.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring openssl-1.0.2.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.

Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

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.2: 459 files,  18M
==> Installing python3
==> Downloading https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tar.xz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/python3/3.4.3 --enable-ipv6 --datarootdir=/usr/local/Cellar/python3/3.4.3/share --datadir=/u
==> make
==> make install PYTHONAPPSDIR=/usr/local/Cellar/python3/3.4.3
==> make frameworkinstallextras PYTHONAPPSDIR=/usr/local/Cellar/python3/3.4.3/share/python3
==> Downloading https://pypi.python.org/packages/source/s/setuptools/setuptools-12.2.tar.gz
######################################################################## 100.0%
==> Downloading https://pypi.python.org/packages/source/p/pip/pip-6.0.8.tar.gz
######################################################################## 100.0%
==> Caveats
Pip and setuptools have been installed. To update them
  pip3 install --upgrade pip setuptools

You can install Python packages with
  pip3 install <package>

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.
==> /usr/local/Cellar/python3/3.4.3/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar
==> /usr/local/Cellar/python3/3.4.3/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar
==> Summary
🍺  /usr/local/Cellar/python3/3.4.3: 5899 files, 100M, built in 2.7 minutes
Andress-MBP:~ andres$ python
Python 2.7.6 (default, Sep  9 2014, 15:04:36) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

>>> 

Add django:
Andress-MBP:/ andres$ open usr/local/Cellar/python3.4.3
location:
$open /usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4

No comments:

Post a Comment