>> 1
终端输入:$ pyenv,
返回内容:
解释:介绍了当前安装的pyenv的版本,一些主要的命令,以及文档的网址。
>> 2
终端输入:$ pyenv versions
返回内容:
system
* anaconda2-4.4.0 (set by /home/guoyunfei/.pyenv/version)
解释:列出当前系统中安装的所以Python版本。前边带 * 的,表示正在使用的版本。
>> 3
版本切换:pyenv global <想要切换的那个版本名称>,
例如:
$ pyenv global system
$ pyenv versions
结果:
* system (set by /home/guoyunfei/.pyenv/version)
anaconda2-4.4.0
注释:会发现当前正在使用的版本切换到了系统默认的版本了。
>> 4
$ pyenv which <版本名称> 会返回该版本的安装位置
$ pyenv which anaconda
/home/guoyunfei/.pyenv/versions/anaconda2-4.4.0/bin/anaconda
终端输入:$ pyenv,
返回内容:
pyenv 1.1.0
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/pyenv/pyenv#readme
解释:介绍了当前安装的pyenv的版本,一些主要的命令,以及文档的网址。
>> 2
终端输入:$ pyenv versions
返回内容:
system
* anaconda2-4.4.0 (set by /home/guoyunfei/.pyenv/version)
解释:列出当前系统中安装的所以Python版本。前边带 * 的,表示正在使用的版本。
>> 3
版本切换:pyenv global <想要切换的那个版本名称>,
例如:
$ pyenv global system
$ pyenv versions
结果:
* system (set by /home/guoyunfei/.pyenv/version)
anaconda2-4.4.0
注释:会发现当前正在使用的版本切换到了系统默认的版本了。
>> 4
$ pyenv which <版本名称> 会返回该版本的安装位置
$ pyenv which anaconda
/home/guoyunfei/.pyenv/versions/anaconda2-4.4.0/bin/anaconda