咨询热线:4006-75-4006
售前:9:00-23:30 备案:9:00-18:00 技术:7*24h
1 | $ curl -L https: //raw .githubusercontent.com /yyuu/pyenv-installer/master/bin/pyenv-installer | bash |
1 2 3 4 5 6 | # Load pyenv automatically by adding # the following to ~/.bash_profile: export PATH= "/home/lavenliu/.pyenv/bin:$PATH" eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)" |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | [lavenliu@VM_113_230_centos ~]$ . ~/.bash_profile [lavenliu@VM_113_230_centos ~]$ pyenv pyenv 20160726 Usage: pyenv < command > [<args>] Some useful pyenv commands are: commands List all available pyenv commands local Set or show the local application-specific Python version global Set or show the global Python version shell Set or show the shell-specific Python version install Install a Python version using python-build uninstall Uninstall a specific Python version rehash Rehash pyenv shims (run this after installing executables) version Show the current Python version and its origin versions List all Python versions available to pyenv which Display the full path to an executable whence List all Python versions that contain the given executable See `pyenv help < command >' for information on a specific command . For full documentation, see: https: //github .com /yyuu/pyenv #readme |
1 | pyenv install 3.5.2 |
1 2 3 4 5 6 7 8 9 | cat ~/.pyenv /plugins/python-build/share/python-build/3 .5.2 #require_gcc install_package "openssl-1.0.2g" "https://www.landui.com/source/openssl-1.0.2g.tar.gz#b784b1b3907ce39abf4098702dade6365522a253ad1552e267a9a0e89594aa33" mac_openssl -- if has_broken_mac_openssl install_package "readline-6.3" "http://www.landui.com/readline/readline-6.3.tar.gz#56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43" standard -- if has_broken_mac_readline if has_tar_xz_support; then install_package "Python-3.5.2" "~/.pyenv/cache/Python-3.5.2.tar.gz" ldflags_dirs standard verify_py35 ensurepip else install_package "Python-3.5.2" "~/.pyenv/cache/Python-3.5.2.tar.gz" ldflags_dirs standard verify_py35 ensurepip fi |
1 | $ mkdir ~/.pyenv /cache |
1 | # yum install -y gcc make patch gdbm-devel openssl-devel sqlite-devel zlib-devel bzip2-devel readline-devel |
1 | $ pyenv install 3.5.2 |
1 2 | pyenv version 3.5.2 ( set by /home/lavenliu/ .python-version) |