This will get you going with the latest version of pyenv and make it easy to fork and contribute any changes back upstream.

  1. Check out pyenv where you want it installed. A good place to choose is $HOME/.pyenv (but you can install it somewhere else).

    $ git clone https://github.com/yyuu/pyenv.git ~/.pyenv
  2. Define environment variable PYENV_ROOT to point to the path where pyenv repo is cloned and add $PYENV_ROOT/binto your $PATH for access to the pyenv command-line utility.

    $ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
    $ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile

    Zsh note: Modify your ~/.zshenv file instead of ~/.bash_profile. Ubuntu note: Modify your ~/.bashrc file instead of ~/.bash_profile.

  3. Add pyenv init to your shell to enable shims and autocompletion. Please make sure eval "$(pyenv init -)" is placed toward the end of the shell configuration file since it manipulates PATH during the initialization.

    $ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile

    Zsh note: Modify your ~/.zshenv file instead of ~/.bash_profile. Ubuntu note: Modify your ~/.bashrc file instead of ~/.bash_profile.

    General warning: There are some systems where the BASH_ENV variable is configured to point to .bashrc. On such systems you should almost certainly put the abovementioned line eval "$(pyenv init -) into .bash_profile, andnot into .bashrc. Otherwise you may observe strange behaviour, such as pyenv getting into an infinite loop. See #264for details.

  4. Restart your shell so the path changes take effect. You can now begin using pyenv.

    $ exec $SHELL
  5. Install Python versions into $PYENV_ROOT/versions. For example, to download and install Python 2.7.8, run:

    $ pyenv install 2.7.8

ubuntu 安装 pythonenv的更多相关文章

  1. Mac OS、Ubuntu 安装及使用 Consul

    Consul 概念(摘录): Consul 是 HashiCorp 公司推出的开源工具,用于实现分布式系统的服务发现与配置.与其他分布式服务注册与发现的方案,比如 Airbnb 的 SmartStac ...

  2. ubuntu安装mysql

    好记性不如烂笔头,记录一下,ubuntu安装mysql的指令. 安装MySQL: sudo apt-get install mysql-server sudo apt-get install mysq ...

  3. ubuntu安装vim时提示 没有可用的软件包 vim,但是它被其它的软件包引用了 解决办法

    ubuntu安装vim时提示 没有可用的软件包 vim-gtk3,但是它被其它的软件包引用了 解决办法 本人在ubuntu系统安装vim  输入 sudo apt-get install vim 提示 ...

  4. docker 1.8+之后ubuntu安装指定版本docker-engine

    这边记录ubuntu安装过程,首先是官网文档 If you haven’t already done so, log into your Ubuntu instance. Open a termina ...

  5. debian/ubuntu安装桌面环境

    apt-get install xorg apt-get install gnome 然后startx ubuntu 安装Gnome桌面 1.安装全部桌面环境,其实Ubuntu系列桌面实际上有几种桌面 ...

  6. 一个ubuntu phper的自我修养(ubuntu安装)

    ubuntu安装篇 一.ubuntu下载 到ubuntu官网下载适合自己电脑配置的系统版本,此处不做展开. 二.制作USB启动盘 在windows下制作USB启动盘,工具是universal usb ...

  7. ubuntu 安装JAVA jdk的两种方法:

    ubuntu 安装jdk 的两种方式: 1:通过ppa(源) 方式安装. 2:通过官网下载安装包安装. 这里推荐第1种,因为可以通过 apt-get upgrade 方式方便获得jdk的升级 使用pp ...

  8. [其他]Ubuntu安装genymotion后unable to load VirtualBox engine

    问题: Ubuntu安装genymotion后unable to load VirtualBox engine 解决办法: 如果没有安装VirtualBox,要先安装VirtualBox. 安装Vir ...

  9. Ubuntu安装出现左上角光标一直闪解决方式

    Ubuntu安装出现左上角光标一直闪解决方式: 01下载ubunu http://cn.ubuntu.com/download/ 02.软碟通 http://pan.baidu.com/s/1qY8O ...

随机推荐

  1. 实践作业1:测试管理工具实践 Day3

    1.Vertrigoserv启动后,首先要配置apache,则需要修改监听端口,不要出现端口冲突2.配置mysql,在mysql console中输入密码vertrigo3.在浏览器中输入http:/ ...

  2. POJ3211--分类01背包

    Washing Clothes Time Limit: 1000MS Memory Limit: 131072K Total Submissions: 9700 Accepted: 3110 Desc ...

  3. python处理csv文件问题解决贴

    实际工作中,碰到这么个问题:有个软件跑在linux系统上,其中用到一个数据库是csv格式的,但要向这个数据库添加600行新的数据,数据源同样是一个csv格式的文件. 有了目标,开始干活.首先想到的是, ...

  4. 小白的Python之路 day1 用户输入

    1 2 3 4 5 6 7 8 #!/usr/bin/env python #_*_coding:utf-8_*_   username =input("username:") p ...

  5. 大白话Vue源码系列(02):编译器初探

    阅读目录 编译器代码藏在哪 Vue.prototype.$mount 构建 AST 的一般过程 Vue 构建的 AST 题接上文,上回书说到,Vue 的编译器模块相对独立且简单,那咱们就从这块入手,先 ...

  6. sphinx+reStructuredText制作文档

    1 spinx简介 Sphinx 是一种文档工具,它可以令人轻松的撰写出清晰且优美的文档, 由 Georg Brandl 在BSD 许可证下开发. 新版的Python文档 就是由Sphinx生成的,并 ...

  7. Ali RocketMQ与Kafka对照

    淘宝内部的交易系统使用了淘宝自主研发的Notify消息中间件,使用Mysql作为消息存储媒介.可全然水平扩容,为了进一步减少成本.我们觉得存储部分能够进一步优化,2011年初,Linkin开源了Kaf ...

  8. [Android] AutoCompleteTextView:自己主动完毕输入内容的控件(自己主动补全)

    AutoCompleteTextView是EditText的直接子类,与普通EditText的最大不同就是.在用户输入的过程中,能够列出可供选择的输入项.方便使用者. AutoCompleteText ...

  9. 【ODPS】TableTunnel单线程简单下载事例

    ODPS Tunnel是ODPS的数据通道,用户能够通过Tunnel向ODPS中上传或者下载数据.眼下Tunnel仅支持表(不包含视图View)数据的上传下载. 主要接口 描写叙述 TableTunn ...

  10. redhat5安装Oracle11g

    redhat5安装Oracle11g 测试环境redhat5.5 oracle11g VMware 虚拟机 一.linux系统安装 二.下载oracle安装包 (我们需要把oracle安装包上传到li ...