个人纪录- mac 安装pyenv 和pyenv-virtualenv
macbook-pro:~ oukisan$ brew install pyenv
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
No changes to formulae.
==> Installing dependencies for pyenv: autoconf, pkg-config, openssl, readline
==> Installing pyenv dependency: autoconf
==> Downloading https://homebrew.bintray.com/bottles/autoconf-2.69.sierra.bottle
######################################################################## 100.0%
==> Pouring autoconf-2.69.sierra.bottle.4.tar.gz
==> Caveats
Emacs Lisp files have been installed to:
/usr/local/share/emacs/site-lisp/autoconf
==> Summary
🍺 /usr/local/Cellar/autoconf/2.69: 70 files, 3.0MB
==> Installing pyenv dependency: pkg-config
==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.29.2.sierra.bo
######################################################################## 100.0%
==> Pouring pkg-config-0.29.2.sierra.bottle.tar.gz
🍺 /usr/local/Cellar/pkg-config/0.29.2: 11 files, 627KB
==> Installing pyenv dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2k.sierra.bottl
######################################################################## 100.0%
==> Pouring openssl-1.0.2k.sierra.bottle.tar.gz
==> Using the sandbox
==> 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
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
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
For pkg-config to find this software you may need to set:
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
==> Summary
🍺 /usr/local/Cellar/openssl/1.0.2k: 1,696 files, 12MB
==> Installing pyenv dependency: readline
==> Downloading https://homebrew.bintray.com/bottles/readline-7.0.3_1.sierra.bot
######################################################################## 100.0%
==> Pouring readline-7.0.3_1.sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
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 this software you may need to set:
LDFLAGS: -L/usr/local/opt/readline/lib
CPPFLAGS: -I/usr/local/opt/readline/include
==> Summary
🍺 /usr/local/Cellar/readline/7.0.3_1: 46 files, 1.5MB
==> Installing pyenv
==> Downloading https://github.com/yyuu/pyenv/archive/v1.0.8.tar.gz
==> Downloading from https://codeload.github.com/pyenv/pyenv/tar.gz/v1.0.8
######################################################################## 100.0%
🍺 /usr/local/Cellar/pyenv/1.0.8: 548 files, 2.2MB, built in 16 seconds
macbook-pro:~ oukisan$ pyenv version
system (set by /Users/oukisan/.pyenv/version)
macbook-pro:~ oukisan$ pyenv install --list
Available versions:
2.1.3
2.2.3
2.3.7
2.4
2.4.1
2.4.2
2.4.3
2.4.4
2.4.5
2.4.6
2.5
2.5.1
2.5.2
2.5.3
2.5.4
2.5.5
2.5.6
2.6.6
2.6.7
2.6.8
2.6.9
2.7-dev
2.7
2.7.1
2.7.2
2.7.3
2.7.4
2.7.5
2.7.6
2.7.7
2.7.8
2.7.9
2.7.10
2.7.11
2.7.12
2.7.13
3.0.1
3.1
3.1.1
3.1.2
3.1.3
3.1.4
3.1.5
3.2-dev
3.2
3.2.1
3.2.2
3.2.3
3.2.4
3.2.5
3.2.6
3.3.0
3.3-dev
3.3.1
3.3.2
3.3.3
3.3.4
3.3.5
3.3.6
3.4.0
3.4-dev
3.4.1
3.4.2
3.4.3
3.4.4
3.4.5
3.4.6
3.5.0
3.5-dev
3.5.1
3.5.2
3.5.3
3.6.0
3.6-dev
3.7-dev
anaconda-1.4.0
anaconda-1.5.0
anaconda-1.5.1
anaconda-1.6.0
anaconda-1.6.1
anaconda-1.7.0
anaconda-1.8.0
anaconda-1.9.0
anaconda-1.9.1
anaconda-1.9.2
anaconda-2.0.0
anaconda-2.0.1
anaconda-2.1.0
anaconda-2.2.0
anaconda-2.3.0
anaconda-2.4.0
anaconda-4.0.0
anaconda2-2.4.0
anaconda2-2.4.1
anaconda2-2.5.0
anaconda2-4.0.0
anaconda2-4.1.0
anaconda2-4.1.1
anaconda2-4.2.0
anaconda2-4.3.0
anaconda3-2.0.0
anaconda3-2.0.1
anaconda3-2.1.0
anaconda3-2.2.0
anaconda3-2.3.0
anaconda3-2.4.0
anaconda3-2.4.1
anaconda3-2.5.0
anaconda3-4.0.0
anaconda3-4.1.0
anaconda3-4.1.1
anaconda3-4.2.0
anaconda3-4.3.0
ironpython-dev
ironpython-2.7.4
ironpython-2.7.5
ironpython-2.7.6.3
ironpython-2.7.7
jython-dev
jython-2.5.0
jython-2.5-dev
jython-2.5.1
jython-2.5.2
jython-2.5.3
jython-2.5.4-rc1
jython-2.7.0
jython-2.7.1b1
jython-2.7.1b2
jython-2.7.1b3
miniconda-latest
miniconda-2.2.2
miniconda-3.0.0
miniconda-3.0.4
miniconda-3.0.5
miniconda-3.3.0
miniconda-3.4.2
miniconda-3.7.0
miniconda-3.8.3
miniconda-3.9.1
miniconda-3.10.1
miniconda-3.16.0
miniconda-3.18.3
miniconda2-latest
miniconda2-3.18.3
miniconda2-3.19.0
miniconda2-4.0.5
miniconda2-4.1.11
miniconda3-latest
miniconda3-2.2.2
miniconda3-3.0.0
miniconda3-3.0.4
miniconda3-3.0.5
miniconda3-3.3.0
miniconda3-3.4.2
miniconda3-3.7.0
miniconda3-3.8.3
miniconda3-3.9.1
miniconda3-3.10.1
miniconda3-3.16.0
miniconda3-3.18.3
miniconda3-3.19.0
miniconda3-4.0.5
miniconda3-4.1.11
pypy-c-jit-latest
pypy-c-nojit-latest
pypy-dev
pypy-stm-2.3
pypy-portable-2.3.1
pypy-portable-2.4
pypy-portable-2.5
pypy-portable-2.5.1
pypy-stm-2.5.1
pypy-portable-2.6
pypy-portable-2.6.1
pypy-portable-4.0
pypy-portable-4.0.1
pypy-portable-5.0
pypy-portable-5.0.1
pypy-portable-5.1
pypy-portable-5.1.1
pypy-portable-5.3.1
pypy-portable-5.4
pypy-portable-5.4.1
pypy-portable-5.6.0
pypy-1.5-src
pypy-1.5
pypy-1.6
pypy-1.7-dev
pypy-1.7
pypy-1.8-dev
pypy-1.8
pypy-1.9-dev
pypy-1.9
pypy-2.0-dev
pypy-2.0-src
pypy-2.0
pypy-2.0.1-src
pypy-2.0.1
pypy-2.0.2-src
pypy-2.0.2
pypy-2.1-src
pypy-2.1
pypy-2.2-src
pypy-2.2
pypy-2.2.1-src
pypy-2.2.1
pypy-2.3-src
pypy-2.3
pypy-2.3.1-src
pypy-2.3.1
pypy-2.4.0-src
pypy-2.4.0
pypy-2.4-beta1-src
pypy-2.4-beta1
pypy-2.5.0-src
pypy-2.5.0
pypy-2.5.1-src
pypy-2.5.1
pypy-2.6.0-src
pypy-2.6.0
pypy-2.6.1-src
pypy-2.6.1
pypy-4.0.0-src
pypy-4.0.0
pypy-4.0.1-src
pypy-4.0.1
pypy-5.0.0-src
pypy-5.0.0
pypy-5.0.1-src
pypy-5.0.1
pypy-5.1-src
pypy-5.1
pypy-5.1.1-src
pypy-5.1.1
pypy-5.3-src
pypy-5.3
pypy-5.3.1-src
pypy-5.3.1
pypy-5.4-src
pypy-5.4
pypy-5.4.1-src
pypy-5.4.1
pypy-5.6.0-src
pypy-5.6.0
pypy2-5.3-src
pypy2-5.3
pypy2-5.3.1-src
pypy2-5.3.1
pypy2-5.4-src
pypy2-5.4
pypy2-5.4.1-src
pypy2-5.4.1
pypy2-5.6.0-src
pypy2-5.6.0
pypy3-dev
pypy3-portable-2.3.1
pypy3-portable-2.4
pypy3-2.3.1-src
pypy3-2.3.1
pypy3-2.4.0-src
pypy3-2.4.0
pypy3.3-5.2-alpha1-src
pypy3.3-5.2-alpha1
pypy3.3-5.5-alpha-src
pypy3.3-5.5-alpha
pypy3.5-c-jit-latest
pyston-0.5.1
pyston-0.6.0
stackless-dev
stackless-2.7-dev
stackless-2.7.2
stackless-2.7.3
stackless-2.7.4
stackless-2.7.5
stackless-2.7.6
stackless-2.7.7
stackless-2.7.8
stackless-2.7.9
stackless-2.7.10
stackless-2.7.11
stackless-2.7.12
stackless-3.2-dev
stackless-3.2.2
stackless-3.2.5
stackless-3.3-dev
stackless-3.3.5
stackless-3.4.1
stackless-3.4.2
macbook-pro:~ oukisan$
macbook-pro:~ oukisan$
macbook-pro:~ oukisan$
macbook-pro:~ oukisan$
macbook-pro:~ oukisan$ pyenv install --list
Available versions:
2.1.3
2.2.3
2.3.7
2.4
2.4.1
2.4.2
2.4.3
2.4.4
2.4.5
2.4.6
2.5
2.5.1
2.5.2
2.5.3
2.5.4
2.5.5
2.5.6
2.6.6
2.6.7
2.6.8
2.6.9
2.7-dev
2.7
2.7.1
2.7.2
2.7.3
2.7.4
2.7.5
2.7.6
2.7.7
2.7.8
2.7.9
2.7.10
2.7.11
2.7.12
2.7.13
3.0.1
3.1
3.1.1
3.1.2
3.1.3
3.1.4
3.1.5
3.2-dev
3.2
3.2.1
3.2.2
3.2.3
3.2.4
3.2.5
3.2.6
3.3.0
3.3-dev
3.3.1
3.3.2
3.3.3
3.3.4
3.3.5
3.3.6
3.4.0
3.4-dev
3.4.1
3.4.2
3.4.3
3.4.4
3.4.5
3.4.6
3.5.0
3.5-dev
3.5.1
3.5.2
3.5.3
3.6.0
3.6-dev
3.7-dev
anaconda-1.4.0
anaconda-1.5.0
anaconda-1.5.1
anaconda-1.6.0
anaconda-1.6.1
anaconda-1.7.0
anaconda-1.8.0
anaconda-1.9.0
anaconda-1.9.1
anaconda-1.9.2
anaconda-2.0.0
anaconda-2.0.1
anaconda-2.1.0
anaconda-2.2.0
anaconda-2.3.0
anaconda-2.4.0
anaconda-4.0.0
anaconda2-2.4.0
anaconda2-2.4.1
anaconda2-2.5.0
anaconda2-4.0.0
anaconda2-4.1.0
anaconda2-4.1.1
anaconda2-4.2.0
anaconda2-4.3.0
anaconda3-2.0.0
anaconda3-2.0.1
anaconda3-2.1.0
anaconda3-2.2.0
anaconda3-2.3.0
anaconda3-2.4.0
anaconda3-2.4.1
anaconda3-2.5.0
anaconda3-4.0.0
anaconda3-4.1.0
anaconda3-4.1.1
anaconda3-4.2.0
anaconda3-4.3.0
ironpython-dev
ironpython-2.7.4
ironpython-2.7.5
ironpython-2.7.6.3
ironpython-2.7.7
jython-dev
jython-2.5.0
jython-2.5-dev
jython-2.5.1
jython-2.5.2
jython-2.5.3
jython-2.5.4-rc1
jython-2.7.0
jython-2.7.1b1
jython-2.7.1b2
jython-2.7.1b3
miniconda-latest
miniconda-2.2.2
miniconda-3.0.0
miniconda-3.0.4
miniconda-3.0.5
miniconda-3.3.0
miniconda-3.4.2
miniconda-3.7.0
miniconda-3.8.3
miniconda-3.9.1
miniconda-3.10.1
miniconda-3.16.0
miniconda-3.18.3
miniconda2-latest
miniconda2-3.18.3
miniconda2-3.19.0
miniconda2-4.0.5
miniconda2-4.1.11
miniconda3-latest
miniconda3-2.2.2
miniconda3-3.0.0
miniconda3-3.0.4
miniconda3-3.0.5
miniconda3-3.3.0
miniconda3-3.4.2
miniconda3-3.7.0
miniconda3-3.8.3
miniconda3-3.9.1
miniconda3-3.10.1
miniconda3-3.16.0
miniconda3-3.18.3
miniconda3-3.19.0
miniconda3-4.0.5
miniconda3-4.1.11
pypy-c-jit-latest
pypy-c-nojit-latest
pypy-dev
pypy-stm-2.3
pypy-portable-2.3.1
pypy-portable-2.4
pypy-portable-2.5
pypy-portable-2.5.1
pypy-stm-2.5.1
pypy-portable-2.6
pypy-portable-2.6.1
pypy-portable-4.0
pypy-portable-4.0.1
pypy-portable-5.0
pypy-portable-5.0.1
pypy-portable-5.1
pypy-portable-5.1.1
pypy-portable-5.3.1
pypy-portable-5.4
pypy-portable-5.4.1
pypy-portable-5.6.0
pypy-1.5-src
pypy-1.5
pypy-1.6
pypy-1.7-dev
pypy-1.7
pypy-1.8-dev
pypy-1.8
pypy-1.9-dev
pypy-1.9
pypy-2.0-dev
pypy-2.0-src
pypy-2.0
pypy-2.0.1-src
pypy-2.0.1
pypy-2.0.2-src
pypy-2.0.2
pypy-2.1-src
pypy-2.1
pypy-2.2-src
pypy-2.2
pypy-2.2.1-src
pypy-2.2.1
pypy-2.3-src
pypy-2.3
pypy-2.3.1-src
pypy-2.3.1
pypy-2.4.0-src
pypy-2.4.0
pypy-2.4-beta1-src
pypy-2.4-beta1
pypy-2.5.0-src
pypy-2.5.0
pypy-2.5.1-src
pypy-2.5.1
pypy-2.6.0-src
pypy-2.6.0
pypy-2.6.1-src
pypy-2.6.1
pypy-4.0.0-src
pypy-4.0.0
pypy-4.0.1-src
pypy-4.0.1
pypy-5.0.0-src
pypy-5.0.0
pypy-5.0.1-src
pypy-5.0.1
pypy-5.1-src
pypy-5.1
pypy-5.1.1-src
pypy-5.1.1
pypy-5.3-src
pypy-5.3
pypy-5.3.1-src
pypy-5.3.1
pypy-5.4-src
pypy-5.4
pypy-5.4.1-src
pypy-5.4.1
pypy-5.6.0-src
pypy-5.6.0
pypy2-5.3-src
pypy2-5.3
pypy2-5.3.1-src
pypy2-5.3.1
pypy2-5.4-src
pypy2-5.4
pypy2-5.4.1-src
pypy2-5.4.1
pypy2-5.6.0-src
pypy2-5.6.0
pypy3-dev
pypy3-portable-2.3.1
pypy3-portable-2.4
pypy3-2.3.1-src
pypy3-2.3.1
pypy3-2.4.0-src
pypy3-2.4.0
pypy3.3-5.2-alpha1-src
pypy3.3-5.2-alpha1
pypy3.3-5.5-alpha-src
pypy3.3-5.5-alpha
pypy3.5-c-jit-latest
pyston-0.5.1
pyston-0.6.0
stackless-dev
stackless-2.7-dev
stackless-2.7.2
stackless-2.7.3
stackless-2.7.4
stackless-2.7.5
stackless-2.7.6
stackless-2.7.7
stackless-2.7.8
stackless-2.7.9
stackless-2.7.10
stackless-2.7.11
stackless-2.7.12
stackless-3.2-dev
stackless-3.2.2
stackless-3.2.5
stackless-3.3-dev
stackless-3.3.5
stackless-3.4.1
stackless-3.4.2
macbook-pro:~ oukisan$ pyenv version
system (set by /Users/oukisan/.pyenv/version)
macbook-pro:~ oukisan$ python --version
Python 2.7.10
macbook-pro:~ oukisan$ python3 --version
Python 3.6.0
macbook-pro:~ oukisan$ ls
Applications Downloads Movies Public python-env
Desktop Form_excise Music Show python_project
Documents Library Pictures day63_chouti
macbook-pro:~ oukisan$ ls -la
total 136
drwxr-xr-x+ 37 oukisan staff 1258 3 25 00:38 .
drwxr-xr-x 6 root admin 204 3 13 18:39 ..
-r-------- 1 oukisan staff 9 1 13 19:56 .CFUserTextEncoding
-rw-r--r--@ 1 oukisan staff 14340 3 25 21:02 .DS_Store
-rw------- 1 oukisan staff 12288 2 21 17:15 .Timestamps.swp
drwx------ 5 oukisan staff 170 3 24 21:53 .Trash
drwxr-xr-x 7 oukisan staff 238 1 16 23:53 .anydesk
drwxr-xr-x 14 oukisan staff 476 3 22 08:56 .atom
-rw------- 1 oukisan staff 7304 3 24 21:25 .bash_history
-rw-r--r-- 1 oukisan staff 237 3 24 15:41 .bash_profile
drwx------ 69 oukisan staff 2346 3 24 21:56 .bash_sessions
drwxr-xr-x 3 oukisan staff 102 1 19 18:01 .config
-rw-r--r-- 1 oukisan staff 93 1 19 18:23 .gitconfig
drwxr-xr-x 3 oukisan staff 102 1 19 18:18 .idlerc
drwxr-xr-x 4 oukisan staff 136 2 8 14:27 .ipynb_checkpoints
drwxr-xr-x 5 oukisan staff 170 2 8 14:26 .ipython
drwxr-xr-x 3 oukisan staff 102 2 8 14:25 .jupyter
drwxr-xr-x 3 oukisan staff 102 3 24 12:39 .pip
-rw------- 1 oukisan staff 766 3 19 09:45 .python_history
drwx------ 5 oukisan staff 170 1 19 16:44 .ssh
drwxr-xr-x 6 oukisan staff 204 2 4 22:26 .subversion
-rw------- 1 oukisan staff 4589 3 24 15:41 .viminfo
-rw-r--r-- 1 oukisan staff 173 3 24 12:15 .wget-hsts
drwx------@ 5 oukisan staff 170 3 4 13:58 Applications
drwx------@ 7 oukisan staff 238 3 24 21:38 Desktop
drwx------@ 9 oukisan staff 306 3 13 20:25 Documents
drwx------@ 98 oukisan staff 3332 3 25 20:57 Downloads
drwxr-xr-x 3 oukisan staff 102 3 24 22:07 Form_excise
drwx------@ 69 oukisan staff 2346 3 18 01:58 Library
drwx------+ 6 oukisan staff 204 3 24 22:12 Movies
drwx------+ 6 oukisan staff 204 1 14 19:07 Music
drwx------+ 5 oukisan staff 170 1 17 18:16 Pictures
drwxr-xr-x+ 5 oukisan staff 170 1 13 19:56 Public
-rw-r--r-- 1 oukisan staff 3444 2 21 17:15 Show
drwxr-xr-x 3 oukisan staff 102 3 24 22:07 day63_chouti
drwxr-xr-x 2 oukisan staff 68 3 25 00:39 python-env
drwxr-xr-x@ 49 oukisan staff 1666 3 24 22:08 python_project
macbook-pro:~ oukisan$ cat .bash_profile
# Setting PATH for Python 3.6
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
export PATH
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
macbook-pro:~ oukisan$ export PYENV_ROOT=/usr/local/var/pyenv
macbook-pro:~ oukisan$ if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi
macbook-pro:~ oukisan$ cat .bash_profile
# Setting PATH for Python 3.6
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
export PATH
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
macbook-pro:~ oukisan$ cat /usr/local/var/pyenv/
cat: /usr/local/var/pyenv/: Is a directory
macbook-pro:~ oukisan$ brew upgrade pyenv
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
fzy streamlink
==> Updated Formulae
ack geoserver lft swiftformat
archi-steam-farm gifcap mkvtoolnix talloc
aws-sdk-cpp git ✔ nspr tcpreplay
b2-tools git-plus percona-server telegraf
bmake github-release percona-server@5.5 texmath
convox gotags percona-server@5.6 vim
davmail imagemagick percona-xtrabackup webpack
dpkg imagemagick@6 pgrouting xmake
ejabberd influxdb pyenv ✔
exercism kobalt rtags
fq ktmpl sonar-scanner
==> Upgrading 1 outdated package, with result:
pyenv 1.0.9
==> Upgrading pyenv
==> Using the sandbox
==> Downloading https://github.com/yyuu/pyenv/archive/v1.0.9.tar.gz
==> Downloading from https://codeload.github.com/pyenv/pyenv/tar.gz/v1.0.9
######################################################################## 100.0%
🍺 /usr/local/Cellar/pyenv/1.0.9: 558 files, 2.2MB, built in 7 seconds
macbook-pro:~ oukisan$ brew install pyenv-virtualenv
==> Using the sandbox
==> Downloading https://github.com/yyuu/pyenv-virtualenv/archive/v1.0.0.tar.gz
==> Downloading from https://codeload.github.com/pyenv/pyenv-virtualenv/tar.gz/v
######################################################################## 100.0%
==> ./install.sh
==> Caveats
To enable auto-activation add to your profile:
if which pyenv-virtualenv-init > /dev/null; then eval "$(pyenv virtualenv-init -)"; fi
==> Summary
🍺 /usr/local/Cellar/pyenv-virtualenv/1.0.0: 20 files, 59.9KB, built in 4 seconds