感谢支持
我们一直在努力

Ubuntu 16.04 LTS Django虚拟开发环境配置

操作系统:Ubuntu 16.04 LTS

注意:系统自带2个版本的Python,一个是python2.7,一个是python3.5,我只需要在python3.5下安装venv虚拟环境

shell命令:

sudo apt-get install python3-venv

然后,等待安装结束,在shell执行命令:

~$ python3 -m venv DjangoENV
~$ cd DjangoENV/
~$ source bin/activate

进入venv虚拟环境,很干净,清爽,接着执行shell命令:

(DjangoENV) warlock921@warlock921-desktop:~$ pip3 list
Django (1.11.5)
pip (8.1.1)
pkg-resources (0.0.0)
pytz (2017.2)
setuptools (20.7.0)
(DjangoENV) warlock921@warlock921-desktop:~$

开始安装django,shell命令:

(DjangoENV) warlock921@warlock921-desktop:~/DjangoENV$ pip3 install django
Collecting django
  Downloading https://pypi.doubanio.com/packages/18/2d/b477232dd619d81766064cd07ba5b35e956ff8a8c5c5d41754e0392b96e3/Django-1.11.5-py2.py3-none-any.whl (6.9MB)
    100% |████████████████████████████████| 7.0MB 12.1MB/s
Collecting pytz (from django)
  Downloading https://pypi.doubanio.com/packages/55/62/e7cd0e15b76062d298413f14bb4ec3cd8568a22d274427f9c3c7286969f4/pytz-2017.2-py2.py3-none-any.whl (484kB)
    100% |████████████████████████████████| 491kB 5.5MB/s
Installing collected packages: pytz, django
Successfully installed django-1.11.5 pytz-2017.2

安装完成,大功告成!

Nginx+uWSGI+Django+Python 应用架构部署  http://www.linuxidc.com/Linux/2015-10/124183.htm

Ubuntu Server 14.04.2 LTS 配置 Nginx + Uwsgi + Django  http://www.linuxidc.com/Linux/2015-04/116397.htm

Flask+uWSGI+Nginx+Ubuntu部署教程 http://www.linuxidc.com/Linux/2016-06/132690.htm

Ubuntu 16.04下安装部署 Nginx+uWSGI+Django1.9.7  http://www.linuxidc.com/Linux/2016-07/133484.htm

Ubuntu 16.10 下部署Django+uWSGI+Nginx服务器  http://www.linuxidc.com/Linux/2017-05/143661.htm

Nginx+uWSGI+Django在Ubuntu下的部署  http://www.linuxidc.com/Linux/2016-07/133490.htm

uWSGI+Nginx+Django安装和配置  http://www.linuxidc.com/Linux/2017-03/141822.htm

Ubuntu下通过Nginx部署Django  http://www.linuxidc.com/Linux/2017-09/147165.htm

本文永久更新链接地址:http://www.linuxidc.com/Linux/2017-09/147174.htm

赞(0) 打赏
转载请注明出处:服务器评测 » Ubuntu 16.04 LTS Django虚拟开发环境配置
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏