【MacOS】brew-python3

mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew

 

 

cd  /Users/defineconst/homebrew/bin

 

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

 

 

Candy:bin defineconst$ ./brew search python3

==> Tapping homebrew/core

Cloning into '/Users/defineconst/homebrew/Library/Taps/homebrew/homebrew-core'...

remote: Enumerating objects: 4865, done.

remote: Counting objects: 100% (4865/4865), done.

remote: Compressing objects: 100% (4653/4653), done.

remote: Total 4865 (delta 50), reused 871 (delta 21), pack-reused 0

Receiving objects: 100% (4865/4865), 4.03 MiB | 562.00 KiB/s, done.

Resolving deltas: 100% (50/50), done.

Checking connectivity... done.

Tapped 2 commands and 4650 formulae (4,905 files, 12.6MB).

==> Formulae

boost-python3                            python@3

python3                                  homebrew/core/boost-python3

Candy:bin defineconst$ brew install python3

==> Installing dependencies for git: gettext and pcre2

==> Installing git dependency: gettext

==> Downloading https://homebrew.bintray.com/bottles/gettext-0.19.8.1.yosemite.b

Updating Homebrew...

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

==> Pouring gettext-0.19.8.1.yosemite.bottle.tar.gz

==> Caveats

gettext is keg-only, which means it was not symlinked into /usr/local,

because macOS provides the BSD gettext library & some software gets confused if both are in the library path.

 

If you need to have gettext first in your PATH run:

  echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile

 

For compilers to find gettext you may need to set:

  export LDFLAGS="-L/usr/local/opt/gettext/lib"

  export CPPFLAGS="-I/usr/local/opt/gettext/include"

 

==> Summary

🍺  /usr/local/Cellar/gettext/0.19.8.1: 1,934 files, 17.0MB

==> Installing git dependency: pcre2

==> Downloading https://ftp.pcre.org/pub/pcre/pcre2-10.32.tar.bz2

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

==> ./configure --prefix=/usr/local/Cellar/pcre2/10.32 --enable-pcre2-16 --enabl

==> make

==> make install

🍺  /usr/local/Cellar/pcre2/10.32: 224 files, 5.6MB, built in 1 minute 18 seconds

==> Installing git

==> Downloading https://www.kernel.org/pub/software/scm/git/git-2.19.1.tar.xz

==> Downloading from https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.

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

==> make install prefix=/usr/local/Cellar/git/2.19.1 sysconfdir=/usr/local/etc C

==> make CC=clang CFLAGS= LDFLAGS=

==> make clean

==> make

==> make test

==> make CC=clang CFLAGS= LDFLAGS=

==> Downloading https://www.kernel.org/pub/software/scm/git/git-manpages-2.19.1.

==> Downloading from https://mirrors.edge.kernel.org/pub/software/scm/git/git-ma

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

==> Downloading https://www.kernel.org/pub/software/scm/git/git-htmldocs-2.19.1.

==> Downloading from https://mirrors.edge.kernel.org/pub/software/scm/git/git-ht

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

==> Caveats

Bash completion has been installed to:

  /usr/local/etc/bash_completion.d

 

zsh completions and functions have been installed to:

  /usr/local/share/zsh/site-functions

 

Emacs Lisp files have been installed to:

  /usr/local/share/emacs/site-lisp/git

==> Summary

🍺  /usr/local/Cellar/git/2.19.1: 1,517 files, 40.3MB, built in 20 minutes 2 seconds

==> Caveats

==> gettext

gettext is keg-only, which means it was not symlinked into /usr/local,

because macOS provides the BSD gettext library & some software gets confused if both are in the library path.

 

If you need to have gettext first in your PATH run:

  echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile

 

For compilers to find gettext you may need to set:

  export LDFLAGS="-L/usr/local/opt/gettext/lib"

  export CPPFLAGS="-I/usr/local/opt/gettext/include"

 

==> git

Bash completion has been installed to:

  /usr/local/etc/bash_completion.d

 

zsh completions and functions have been installed to:

  /usr/local/share/zsh/site-functions

 

Emacs Lisp files have been installed to:

  /usr/local/share/emacs/site-lisp/git

==> Installing dependencies for python: pkg-config, gdbm, makedepend, openssl, readline, sqlite and xz

==> Installing python dependency: pkg-config

==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.29.2.yosemite.

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

==> Pouring pkg-config-0.29.2.yosemite.bottle.tar.gz

🍺  /usr/local/Cellar/pkg-config/0.29.2: 11 files, 631KB

==> Installing python dependency: gdbm

==> Downloading https://ftp.gnu.org/gnu/gdbm/gdbm-1.18.1.tar.gz

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

==> ./configure --disable-silent-rules --without-readline --prefix=/usr/local/Ce

==> make install

🍺  /usr/local/Cellar/gdbm/1.18.1: 20 files, 591.6KB, built in 2 minutes 31 seconds

==> Installing python dependency: makedepend

==> Downloading https://homebrew.bintray.com/bottles/makedepend-1.0.5.yosemite.b

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

==> Pouring makedepend-1.0.5.yosemite.bottle.1.tar.gz

🍺  /usr/local/Cellar/makedepend/1.0.5: 7 files, 72.8KB

==> Installing python dependency: openssl

==> Downloading https://www.openssl.org/source/openssl-1.0.2p.tar.gz

 

curl: (35) Unknown SSL protocol error in connection to www.openssl.org:-9838

Trying a mirror...

==> Downloading https://dl.bintray.com/homebrew/mirror/openssl--1.0.2p.tar.gz

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

==> perl ./Configure --prefix=/usr/local/Cellar/openssl/1.0.2p --openssldir=/usr

==> make depend

==> make

==> make test

==> make install MANDIR=/usr/local/Cellar/openssl/1.0.2p/share/man MANSUFFIX=ssl

==> Caveats

A CA file has been bootstrapped using certificates from the SystemRoots

keychain. To add additional certificates (e.g. the certificates added in

the System keychain), place .pem files in

  /usr/local/etc/openssl/certs

 

and run

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

 

openssl is keg-only, which means it was not symlinked into /usr/local,

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

 

If you need to have openssl first in your PATH run:

  echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile

 

For compilers to find openssl you may need to set:

  export LDFLAGS="-L/usr/local/opt/openssl/lib"

  export CPPFLAGS="-I/usr/local/opt/openssl/include"

 

For pkg-config to find openssl you may need to set:

  export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"

 

==> Summary

🍺  /usr/local/Cellar/openssl/1.0.2p: 1,785 files, 12.1MB, built in 8 minutes

==> Installing python dependency: readline

==> Downloading https://ftp.gnu.org/gnu/readline/readline-7.0.tar.gz

 

curl: (28) Operation timed out after 0 milliseconds with 0 out of 0 bytes received

Trying a mirror...

==> Downloading https://ftpmirror.gnu.org/readline/readline-7.0.tar.gz

==> Downloading from https://mirrors.sjtug.sjtu.edu.cn/gnu/readline/readline-7.0

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

==> Downloading https://ftp.gnu.org/gnu/readline/readline-7.0-patches/readline70

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

==> Downloading https://ftp.gnu.org/gnu/readline/readline-7.0-patches/readline70

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

==> Downloading https://ftp.gnu.org/gnu/readline/readline-7.0-patches/readline70

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

==> Downloading https://ftp.gnu.org/gnu/readline/readline-7.0-patches/readline70

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

==> Downloading https://ftp.gnu.org/gnu/readline/readline-7.0-patches/readline70

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

==> Patching

==> Applying readline70-001

patching file history.c

patching file patchlevel

==> Applying readline70-002

patching file history.c

patching file patchlevel

==> Applying readline70-003

patching file input.c

patching file patchlevel

==> Applying readline70-004

patching file display.c

patching file patchlevel

==> Applying readline70-005

patching file readline.c

patching file patchlevel

==> ./configure --prefix=/usr/local/Cellar/readline/7.0.5

==> make install

==> Caveats

readline is keg-only, which means it was not symlinked into /usr/local,

because macOS 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.

 

For compilers to find readline you may need to set:

  export LDFLAGS="-L/usr/local/opt/readline/lib"

  export CPPFLAGS="-I/usr/local/opt/readline/include"

 

==> Summary

🍺  /usr/local/Cellar/readline/7.0.5: 46 files, 1.5MB, built in 1 minute 57 seconds

==> Installing python dependency: sqlite

==> Downloading https://sqlite.org/2018/sqlite-autoconf-3250300.tar.gz

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

==> ./configure --prefix=/usr/local/Cellar/sqlite/3.25.3 --enable-dynamic-extens

==> make install

==> Caveats

sqlite is keg-only, which means it was not symlinked into /usr/local,

because macOS provides an older sqlite3.

 

If you need to have sqlite first in your PATH run:

  echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.bash_profile

 

For compilers to find sqlite you may need to set:

  export LDFLAGS="-L/usr/local/opt/sqlite/lib"

  export CPPFLAGS="-I/usr/local/opt/sqlite/include"

 

For pkg-config to find sqlite you may need to set:

  export PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig"

 

==> Summary

🍺  /usr/local/Cellar/sqlite/3.25.3: 11 files, 3.8MB, built in 1 minute 9 seconds

==> Installing python dependency: xz

==> Downloading https://downloads.sourceforge.net/project/lzmautils/xz-5.2.4.tar

 

curl: (28) Operation timed out after 0 milliseconds with 0 out of 0 bytes received

Trying a mirror...

==> Downloading https://tukaani.org/xz/xz-5.2.4.tar.gz

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

curl: (28) Operation timed out after 0 milliseconds with 0 out of 0 bytes received

Error: An exception occurred within a child process:

  DownloadError: Failed to download resource "xz"

Download failed: https://tukaani.org/xz/xz-5.2.4.tar.gz

 

Candy:downloads defineconst$ brew install python3

Updating Homebrew...

==> Installing dependencies for python: xz

==> Installing python dependency: xz

==> Downloading https://downloads.sourceforge.net/project/lzmautils/xz-5.2.4.tar

Already downloaded: /Users/defineconst/Library/Caches/Homebrew/downloads/60057e32fccba99ff98a423a0d5bbb3299325346de36997e4e59bb96a3c2da2e--xz-5.2.4.tar.gz

==> ./configure --disable-silent-rules --prefix=/usr/local/Cellar/xz/5.2.4

==> make check

==> make install

Error: The `brew link` step did not complete successfully

The formula built, but is not symlinked into /usr/local

Could not symlink bin/lzcat

Target /usr/local/bin/lzcat

already exists. You may want to remove it:

  rm '/usr/local/bin/lzcat'

 

To force the link and overwrite all conflicting files:

  brew link --overwrite xz

 

To list all files that would be deleted:

  brew link --overwrite --dry-run xz

 

Possible conflicting files are:

/usr/local/bin/lzcat -> /usr/local/bin/xz

/usr/local/bin/lzcmp -> /usr/local/bin/xzdiff

/usr/local/bin/lzdiff -> /usr/local/bin/xzdiff

/usr/local/bin/lzegrep -> /usr/local/bin/xzgrep

/usr/local/bin/lzfgrep -> /usr/local/bin/xzgrep

/usr/local/bin/lzgrep -> /usr/local/bin/xzgrep

/usr/local/bin/lzless -> /usr/local/bin/xzless

/usr/local/bin/lzma -> /usr/local/bin/xz

/usr/local/bin/lzmadec

/usr/local/bin/lzmainfo

/usr/local/bin/lzmore -> /usr/local/bin/xzmore

/usr/local/bin/unlzma -> /usr/local/bin/xz

/usr/local/bin/unxz -> /usr/local/bin/xz

/usr/local/bin/xz

/usr/local/bin/xzcat -> /usr/local/bin/xz

/usr/local/bin/xzcmp -> /usr/local/bin/xzdiff

/usr/local/bin/xzdec

/usr/local/bin/xzdiff

/usr/local/bin/xzegrep -> /usr/local/bin/xzgrep

/usr/local/bin/xzfgrep -> /usr/local/bin/xzgrep

/usr/local/bin/xzgrep

/usr/local/bin/xzless

/usr/local/bin/xzmore

/usr/local/include/lzma/base.h

/usr/local/include/lzma/bcj.h

/usr/local/include/lzma/block.h

/usr/local/include/lzma/check.h

/usr/local/include/lzma/container.h

/usr/local/include/lzma/delta.h

/usr/local/include/lzma/filter.h

/usr/local/include/lzma/hardware.h

/usr/local/include/lzma/index.h

/usr/local/include/lzma/index_hash.h

/usr/local/include/lzma/lzma12.h

/usr/local/include/lzma/stream_flags.h

/usr/local/include/lzma/version.h

/usr/local/include/lzma/vli.h

/usr/local/include/lzma.h

/usr/local/share/doc/xz/AUTHORS

/usr/local/share/doc/xz/COPYING

/usr/local/share/doc/xz/COPYING.GPLv2

/usr/local/share/doc/xz/NEWS

/usr/local/share/doc/xz/README

/usr/local/share/doc/xz/THANKS

/usr/local/share/doc/xz/TODO

/usr/local/share/doc/xz/examples/00_README.txt

/usr/local/share/doc/xz/examples/01_compress_easy.c

/usr/local/share/doc/xz/examples/02_decompress.c

/usr/local/share/doc/xz/examples/03_compress_custom.c

/usr/local/share/doc/xz/examples/04_compress_easy_mt.c

/usr/local/share/doc/xz/examples/Makefile

/usr/local/share/doc/xz/examples_old/xz_pipe_comp.c

/usr/local/share/doc/xz/examples_old/xz_pipe_decomp.c

/usr/local/share/doc/xz/faq.txt

/usr/local/share/doc/xz/history.txt

/usr/local/share/doc/xz/lzma-file-format.txt

/usr/local/share/doc/xz/xz-file-format.txt

/usr/local/share/man/man1/lzcat.1 -> /usr/local/share/man/man1/xz.1

/usr/local/share/man/man1/lzcmp.1 -> /usr/local/share/man/man1/xzdiff.1

/usr/local/share/man/man1/lzdiff.1 -> /usr/local/share/man/man1/xzdiff.1

/usr/local/share/man/man1/lzegrep.1 -> /usr/local/share/man/man1/xzgrep.1

/usr/local/share/man/man1/lzfgrep.1 -> /usr/local/share/man/man1/xzgrep.1

/usr/local/share/man/man1/lzgrep.1 -> /usr/local/share/man/man1/xzgrep.1

/usr/local/share/man/man1/lzless.1 -> /usr/local/share/man/man1/xzless.1

/usr/local/share/man/man1/lzma.1 -> /usr/local/share/man/man1/xz.1

/usr/local/share/man/man1/lzmadec.1 -> /usr/local/share/man/man1/xzdec.1

/usr/local/share/man/man1/lzmainfo.1

/usr/local/share/man/man1/lzmore.1 -> /usr/local/share/man/man1/xzmore.1

/usr/local/share/man/man1/unlzma.1 -> /usr/local/share/man/man1/xz.1

/usr/local/share/man/man1/unxz.1 -> /usr/local/share/man/man1/xz.1

/usr/local/share/man/man1/xz.1

/usr/local/share/man/man1/xzcat.1 -> /usr/local/share/man/man1/xz.1

/usr/local/share/man/man1/xzcmp.1 -> /usr/local/share/man/man1/xzdiff.1

/usr/local/share/man/man1/xzdec.1

/usr/local/share/man/man1/xzdiff.1

/usr/local/share/man/man1/xzegrep.1 -> /usr/local/share/man/man1/xzgrep.1

/usr/local/share/man/man1/xzfgrep.1 -> /usr/local/share/man/man1/xzgrep.1

/usr/local/share/man/man1/xzgrep.1

/usr/local/share/man/man1/xzless.1

/usr/local/share/man/man1/xzmore.1

/usr/local/lib/liblzma.5.dylib

/usr/local/lib/liblzma.a

/usr/local/lib/liblzma.dylib -> /usr/local/lib/liblzma.5.dylib

/usr/local/lib/pkgconfig/liblzma.pc

==> Summary

🍺  /usr/local/Cellar/xz/5.2.4: 92 files, 1MB, built in 1 minute 35 seconds

==> Installing python

==> Downloading https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tar.xz

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

==> ./configure --prefix=/usr/local/Cellar/python/3.7.1 --enable-ipv6 --dataroot

 

 

 

 

 

 

注意:

open  .bash_profile

export PATH=/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/Cellar/python/3.7.1/bin

alias python="/usr/local/Cellar/python/3.7.1/bin/python3"

source .bash_profile

 

 

 

posted @ 2018-11-17 23:32  咸鱼翻身  阅读(2528)  评论(0编辑  收藏  举报