# Python 2.7.6:
wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
tar xf Python-2.7.6.tar.xz
cd Python-2.7.6
./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
make && make altinstall

# Python 3.3.5:
wget http://python.org/ftp/python/3.3.5/Python-3.3.5.tar.xz
tar xf Python-3.3.5.tar.xz
cd Python-3.3.5
./configure --prefix=/usr/local --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
make && make altinstall

-------------------------------------------------start

在virtualenv-15.1.0目录下:
ubuntu@ubuntu:~/mydocument/virtualenv-15.1.0$ python setup.py build
ubuntu@ubuntu:~/mydocument/virtualenv-15.1.0$ sudo python setup.py install

用 python2.7创建环境myenv2.7
ubuntu@ubuntu:~/mydocument/virtualenv-15.1.0$ virtualenv -p python2.7 myenv2.7

# Activate the my27project sandbox and check the version of the default Python interpreter in it:
source my27project/bin/activate
python --version
# This will show Python 2.7.6
deactivate

# Activate the my33project sandbox and check the version of the default Python interpreter in it:
source my33project/bin/activate
python --version
# This will show Python 3.3.5
deactivate

把Django安装文件放在myenv2.7 目录下:
source myenv2.7/bin/activate
tar xzvf Django-1.9.11.tar.gz
python setup.py build
python setup.py install

django-admin --help (验证是否安装成功)


django-admin startproject mysite

python manage.py runserver 0.0.0.0:8000   (0.0.0.0表示访问真实地址)

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

  1. python virtualenv环境安装(ubuntu)

    测试系统ubantu16.04 该系统已经默认安装了python3.5, 当然了python2.7也同时存在着. 可以用如下命令安装pip(如下命令会默认安装pip到python2.7库中) $ su ...

  2. 在virtualenv中安装libxml2和libxslt

    在使用python的工作中,需要使用到libxml2和libxslt库.原来在实际环境中已经安装完成了,但是在virtualenv中还没有,现在正在整理virtualenv的环境.下面把在virtua ...

  3. python 2.7.11 环境安装

    0  安装依赖: yum install zlib zlib-devel readline-devel sqlite-devel bzip2-devel openssl-devel gdbm-deve ...

  4. 第四百零一节,Django+Xadmin打造上线标准的在线教育平台—生产环境部署virtualenv虚拟环境安装,与Python虚拟环境批量安装模块

    第四百零一节,Django+Xadmin打造上线标准的在线教育平台—生产环境部署virtualenv虚拟环境安装,与Python虚拟环境批量安装模块 virtualenv简介 1.安装virtuale ...

  5. centos6.9安装python3.6.9独立的virtualenv环境,并且能正确引入ssl

    centos6.9安装python3.6.9独立的virtualenv环境,并且能正确引入ssl 1.编译安装python3.6环境# 安装依赖yum -y install zlib-devel bz ...

  6. centos7安装python3.6独立的virtualenv环境

    centos7安装python3.6独立的virtualenv环境 1.编译安装python3.6环境# 安装依赖yum -y install zlib-devel bzip2-devel opens ...

  7. pycharm中使用配置好的virtualenv环境,自动生成和安装requirements.txt依赖

    1.手动建立: 第一步 建立虚拟环境 Windows cmd: pip install virtualenv 创建虚拟环境目录 env 激活虚拟环境 C:\Python27\Scripts\env\S ...

  8. python virtualenv环境运行django

    python virtualenv环境运行django 安装前准备 检查pip版本与python版本是否一致 [root@localhost bin]# whereis pip pip: /usr/b ...

  9. Windows下Python,setuptools,pip,virtualenv的安装

    Windows 2003平台,安装Python2.7.4,Python3.3,setuptools,pip,virtualenv. 安装Python2.7.4(当前版本是2.7.6),安装路径:C:\ ...

随机推荐

  1. HTML5_纯JS实现上传文件显示文件大小,文件信息,上传进度_不使用JS库

    前台 html <input type="file" id="_netLogo" onchange="fileSelected();" ...

  2. 设计模式之策略模式的Python实现

    1. 策略模式解决的是什么问题 策略模式解决的应用场景是这样的: 在业务场景中,需要用到多个算法,并且每个算法的参数是需要调整的.那么当不同的行为堆砌到同一个类中时,我们很难避免使用条件语句来选择合适 ...

  3. 刷题总结——子串(NOIP2015)

    题目: 题目背景 NOIP2015 提高组 Day2 T2 题目描述 有两个仅包含小写英文字母的字符串 A 和 B .现在要从字符串 A 中取出 k 个互不重叠的非空子串,然后把这 k 个子串按照其在 ...

  4. Codeforces Round #352 (Div. 2) B

    B. Different is Good time limit per test 2 seconds memory limit per test 256 megabytes input standar ...

  5. Codeforces Round #324 (Div. 2) A

    A. Olesya and Rodion time limit per test 1 second memory limit per test 256 megabytes input standard ...

  6. java泛型的一些解释

    public <A extends Annotation> A getAnnotation(Class<A> annotationClass)我们经常在帮助文档中看到这样的方法 ...

  7. 实现实体类和Xml相互转化

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.X ...

  8. [ZJOI2008]树的统计——树链剖分

    本题是一个树链剖分裸题,由于比较菜,老是RE,后来发现是因为使用了全局变量. /************************************************************ ...

  9. 三、第一个cocos2d程序的代码分析

    http://blog.csdn.net/q199109106q/article/details/8591706 在第一讲中已经新建了第一个cocos2d程序,运行效果如下: 在这讲中我们来分析下里面 ...

  10. Visual Studio Code 好用的 source code editor

    short cut https://code.visualstudio.com/shortcuts/keyboard-shortcuts-linux.pdf go to definition : F1 ...