1、pyenv 安装

curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash

若是安装失败,则 手动将代码当下来安装,我在centos 6.6 python2.6.6下安装不成功,报 环境变量没配置上去。后面用了 https://gist.github.com/ysaotome/7956676 的脚本

#!/bin/zsh
# pyenv install for CentOS 6.5 x86_64 yum install -y gcc gcc-c++ make git patch openssl-devel zlib-devel readline-devel sqlite-devel bzip2-devel git clone git://github.com/yyuu/pyenv.git ~/.pyenv export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)" cat << _PYENVCONF_ >> ~/.bash_profile
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
_PYENVCONF_ pyenv install 2.7.
pyenv versions pyenv shell 2.7.
pyenv global 2.7.
pyenv versions
pyenv rehash

2、 安装 pyenv-virtualenv

git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bash_profile

参考资料:

1、http://www.it165.net/pro/html/201405/13603.html  用pyenv和virtualenv搭建单机多版本python虚拟开发环境

2、https://github.com/yyuu/pyenv

3、 https://gist.github.com/ysaotome/7956676 pyenv install for CentOS 6.5 x86_64

4、https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/ anaconda镜像

5、 https://github.com/yyuu/pyenv-virtualenv

python 多环境安装的更多相关文章

  1. note 0 Python介绍及Python IDE环境安装 Spyder with Anaconda

    高级语言分类 编译型语言(C/C++等) 解释型语言(BASIC.Python等) Python 诞生于1989年,创始人为吉多 范罗苏姆(Guido van Rossum) Python 语言特点 ...

  2. python+selenium环境安装

    目前 selenium 版本已经升级到 3.7了,网上的大部分教程是基于 2.x写的,所 以在学习前先要弄清楚版本号,这点非常重要.本系列依然以 selenium2 为基础, 目前 selenium3 ...

  3. python开发环境安装配置

    需要安装的软件: Python2.7.14和Python3.6.4   要在电脑上同时安装两个版本 开发工具:PyCharm 是一个jetbrains的python开发工具  idea系列之一 Pyt ...

  4. python 独立环境安装

    python 即使是单独编译安装的,库文件的安装还是会与其它python的库存放到相同的地方 使用同版本库不会有问题,但是需要升级库的时候,就会出现冲突,导致依赖这个旧库的python出现问题 这时候 ...

  5. python开发环境安装

    1.首先安装python-3.4.2.msi,此为python主程序,双击安装,根据自身的情况做选择,也可以使用默认设置,一路next也没什么问题. 2.设置环境变量=>编辑Path,在最后加上 ...

  6. python初始环境安装

    Python下载地址 Python官网:https://www.python.org/ 在该网可以下载Python最新及历史版本.可以下载基于Windows或其它操作系统的版本. Python安装 本 ...

  7. s11 day 101 python Linux环境安装 与路飞项目支付功能

    from django.conf.urls import urlfrom django.contrib import adminfrom app01 import viewsurlpatterns = ...

  8. sublime txet 3 python 开发环境安装配置

    下载python 下载地址:https://www.python.org/downloads/windows/ 下载sublime text 3 下载地址:https://www.sublimetex ...

  9. python—day01_环境安装

    搭建环境 1.win10_X64,其他Win版本也可以. 2.安装python.()3.PyCharm版本:Professional-2016.2.3. 在Windows上安装Python 首先,根据 ...

随机推荐

  1. nth-of-type在选择class的时候需要注意的一个小问题

    查了下w3和MDN的手册,没发现有这个说明,写篇随笔记下. 1..class:nth-of-type(n)在选择class的时候,如果在class前面插入x个同类型标签,n需要加上x <!DOC ...

  2. 【转】XenServer架构之XAPI的调用流程

    XAPI 调用是使用XML-RPC协议通过网络发送到安装有XenServer 的主机上.XAPI对象的引用不保证对象的永久标识符,引用不允许对象进行相等比较.对同一物体的两个引用,不保证是文本相同的. ...

  3. BZOJ3527[ZJOI]力

    无题面神题 原题意: 求所有的Ei=Fi/qi. 题解: qi被除掉了,则原式中的qj可以忽略. 用a[i]表示q[i],用b[j-i]来表示±1/((j-i)^2)(j>i时为正,j<i ...

  4. [LeetCode] Repeated Substring Pattern 重复子字符串模式

    Given a non-empty string check if it can be constructed by taking a substring of it and appending mu ...

  5. [LeetCode] Longest Valid Parentheses 最长有效括号

    Given a string containing just the characters '(' and ')', find the length of the longest valid (wel ...

  6. web兼容学习分析笔记-margin 和padding浏览器解析差异

    二.margin 和padding浏览器解析差异 只有默认margin的元素 <body>margin:8px  margin:15px 10px 15px 10px(IE7) <b ...

  7. [板子]ISAP

    ISAP求最大流,敲了一发板子,无压行,教程略去.转载请随意. #include <cstdio> #include <cstring> #include <algori ...

  8. js兼容性

    1.getElementByClassName 在使用原生JavaScript时,获取类选择符时,即使用getElementByClassName,它在Firefox和IE下是不能兼容. Firefo ...

  9. jQuery种种

    jquery UI autocomplete获得焦点自动弹出跟随下拉框--http://blog.csdn.net/jiusong_mi/article/details/49249853 $(&quo ...

  10. ThreadPoolTimer -延迟执行, 周期执行

    介绍重新想象 Windows 8 Store Apps 之 线程池 通过 ThreadPoolTimer 实现延迟执行 通过 ThreadPoolTimer 实现周期执行 通过 ThreadPool ...