python2.7 vlrtualenv
如果是2.6用这个,最好用2.7,
virtualenv
http://www.360doc.com/content/12/0709/16/869651_223209860.shtml python2.6.6 yum install python-virtualenv virtualenv mysite cd mysite/ source bin/activate echo $VIRTUAL_ENV echo $PATH
清除:
virtualenv--clearmysite
#-#######################################
如果是2.6.6
先修改/usr/bin/yum
头从python改成python26
然后备份/usr/bin/python
yuminstallzlibzlib-devel
./configure编译python
easy_install:
想安装virtualenv
centos6.5的python2.6.6
由于新环境要求是2.7
所以安装python2.7
编译安装之前一定要
yuminstallopenssl-devel
因为需要使用https下载文件
./configure --prefix=/usr/local/python278/ make make install 使用的时候不要使用python,默认还是 要指定/usr/local/python278/bin/python 安装easy_install wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py -O - | /usr/local/python278/bin/python 注意/usr/local/python278/lib/python2.7/site-packages/ 目录的变化 每次安装这里都会变 安装pip tar xvf pip-1.5.6.tar.gz cd pip-1.5.6 /usr/local/python278/bin/python setup.py instal #virtualenv easy_install virtualenv ############## #virtualenv env #source env/bin/activate pip install django pip install djangorestframework pip install pygments #mysql yum install mysql-server grant all privileges on *.* to root@% identified by 'haoning'; flush privileges; #mysqldb yum install mysql-devel pip install MySQL-python
参考
http://www.django-rest-framework.org/tutorial/1-serialization#creating-a-model-to-work-with
django学习
参考
相关推荐
jacktangj 2020-08-20
D先生 2020-06-28
fengzhiwu 2020-06-10
txlCandy 2020-06-09
fengzhiwu 2020-06-07
sunny0 2020-06-01
sesiria 2020-05-31
huavhuahua 2020-05-28
JakobHu 2020-05-27
宿舍 2020-05-15
bcbeer 2020-05-15
小火车 2020-05-07
fendou00sd 2020-05-09
周小董 2020-05-06
zhangwentaohh 2020-05-04
坚持是一种品质 2020-04-15
葫芦小金刚 2020-03-12
zhuquan0 2020-03-02