python虚拟环境Django,python-virtualenv安装

来源:互联网 发布:淘宝网 布料 编辑:程序博客网 时间:2024/05/22 16:56
Django安装
pip install Django==1.8.4
Centos6.5环境安装python-virtualenv时,yum安装失败:

yum install python-virtualenv

错误提示:

Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Setting up Install Process
No package python-virtualenv available.

没有找到此问题的具体原因和解决方案,所以只能更换virtualenv的安装方式。

另一种安装方式:

yum install python-setuptools
easy_install virtualenv
创建虚拟环境
virtualenv  ll_env
source ll_env/bin/activate
django-admin.py  startproject learning_log
启动项目服务,进入learning_log项目
cd learning_log
python manage.py runserver 192.168.1.41:80
记得关闭防火墙
service iptables stop
参考:https://zhidao.baidu.com/question/1606922450475716267.html
         http://www.cnblogs.com/freeweb/p/5210167.html
windows 安装virtualenv和Django如下
pip install virtualenv
virtualenv参考:http://blog.csdn.net/ybdesire/article/details/50486777
pip install Django==1.8.4
原创粉丝点击