CentOS6.7安装python的virtualenv环境

安装virtualenv,可以虚拟多个python版本的环境

1、安装epel源

[[email protected] ~]# yum install epel-release -y

2、安装python-virtualenv

[[email protected] ~]# yum install python-virtualenv -y

3、创建virtualenv环境

[[email protected] ~]# mkdir ~/.virtualenv
[[email protected] .virtualenv]# virtualenv --python=/home/python27/bin/python pyweb
Running virtualenv with interpreter /home/python27/bin/python
New python executable in pyweb/bin/python
Installing Setuptools..............................................................................................................................................................................................................................done.
Installing Pip.....................................................................................................................................................................................................................................................................................................................................done.
[[email protected] .virtualenv]# source ./pyweb/bin/activate
(pyweb)[[email protected] .virtualenv]# 
(pyweb)[[email protected] .virtualenv]# 
#出现(pyweb)说明你已经进入虚拟环境了
#进入虚拟环境
#source ~/.virtualenv/pyweb/activate
#
#退出虚拟环境
(pyweb)[[email protected] .virtualenv]# deactivate 
[[email protected] .virtualenv]# 
(pyweb)[[email protected] pyweb]# python --version
Python 2.7.11
(pyweb)[[email protected] pyweb]# 
(pyweb)[[email protected] pyweb]# deactivate 

[[email protected] .virtualenv]# virtualenv pyweb1
New python executable in pyweb1/bin/python
Installing Setuptools..............................................................................................................................................................................................................................done.
Installing Pip.....................................................................................................................................................................................................................................................................................................................................done.
[[email protected] .virtualenv]# 
[[email protected] .virtualenv]# source pyweb1/bin/activate
(pyweb1)[[email protected] .virtualenv]# python --version
Python 2.6.6
(pyweb1)[[email protected] .virtualenv]#

#完成了!

时间: 2024-10-10 15:16:40

CentOS6.7安装python的virtualenv环境的相关文章

CentOS6.4安装python2.7.3环境和Tornado

Centos6.4默认的python环境是2.6.6.我们可以自己安装Python 2.7.3. 但是值得注意的是,我们必须不能破坏系统的环境. 因为几个关键的实用应用程序依赖于Python2.6.6. 如果替换了系统的python环境就会发生很多难以预见的错误,导致要重装系统. 在没有破坏系统的python环境的情况下安装Python 2.7.3. 执行以下命令,请使 用root的身份登录或者使用sudo命令 一.安装Python 2.7.3 1. 安装开发工具 为了编辑Python,你必须要

Centos6.5 安装Python 3.5

1.CentOS6.5 安装Python 的依赖包 yum groupinstall "Development tools" yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel 2.下载Python3.5的源码包并编译 wget https://www.

linux中安装python科学计算环境-numpy、scipy、matplotlib、OpenCV...

http://blog.csdn.net/pipisorry/article/details/39902327 在Ubuntu中安装numpy.scipy.matplotlib.OpenCV等 和Python(x,y)不一样,在Ubuntu中需要手工安装科学计算的各个模块, 如何安装IPython, NumPy, SciPy, matplotlib, PyQt4, Spyder, Cython, SWIG, ETS, OpenCV: 在Ubuntu下安装Python模块通常可以使用apt-get

怎样在Win7 64位旗舰版安装Python+Eclipse开发环境

原地址:http://www.cnblogs.com/balian/archive/2011/06/19/2084632.html 自从上周抛弃了WinXP转而安装了Win7,64位后,尝试安装Python+Eclipse遇到了一点小问题.现在已经解决,将安装顺序记录如下,供参考. Setp1,到ORACLE网站下载64位的JDK.http://www.oracle.com/technetwork/java/javase/downloads/index.html下载JDK,我下载的是jdk-6u

CentOS6.5 安装Python 的依赖包

1.CentOS6.5 安装Python 的依赖包 yum groupinstall "Development tools"yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel 2.下载Python3.5的源码包并编译 wget https://www.p

06 windows安装Python+Pycharm+Scrapy环境

windows安装Python+Pycharm+Scrapy环境 一.卸载python环境 卸载以下软件: 二.安装python环境 (1) 安装python开发环境3.6.4,双击运行“python-3.6.4-amd64.exe” 在C盘创建python文件夹,在python文件夹里面创建python_venv文件夹 输入“win+r”,输入cmd,,检查python是否安装成功,是否成功配置环境变量,出现下面情况,表示安装成功. (2)安装python开发工具pycharm双击运行“pyc

CentOS6.5安装python环境

在Linux CentOS 6.6上安装Python 2.7.9  本文适用于Centos6.5 CentOS 6.6自带的是Python 2.6.6,而编译llvm需要Python 2.7以上. checking for python... /usr/bin/python checking for python >= 2.7... not found configure: error: found python 2.6.6 (/usr/bin/python); required >= 2.7

Centos6.8安装python环境

一.安装步骤1.检查系统pythonCentOS 6.8自带的是Python 2.6.6,yum中最新的也是Python 2.6.6,只能下载Python 2.7.12的源代码自己编译安装.如下图: 安装Development tools#yum -y groupinstall "Development tools" 安装编译Python需要的包#yum install zlib-devel -y#yum install bzip2-devel -y#yum install opens

windows+Python+virtualenv 环境配置

virtualenv是Python中常用的虚拟环境.可以理解为属于Python的虚拟机. 在Linux和Mac系统上,virtualenv环境是很方便配置的,但是在windows平台上比较麻烦,记录下来和大家分享. 安装 Python 注:本次配置的Python版本是 2.7.X,也就是老版本,新版本Python 3.X 有一些库不支持,所以没有使用. window下Python 2.7.x的配置就不多说,网上资料很多,可以参见这里.只是下载时候下载 2.7.X 版本.同时,切记将Python