Ubuntu下利用pyenv管理各Python版本

>> 1
终端输入:$ 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


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值