我使用的是python3.6
首先创建了一个文件夹
mkdir django_project
cd django_project
# 创建虚拟环境
mkdir env
virtualenv env -p python3.6
. env/bin/activate
# 查看安装过的包
pip freeze
# 安装django
pip install django
"""
Collecting django
Downloading Django-1.11.4-py2.py3-none-any.whl (6.9MB)
100% |████████████████████████████████| 7.0MB 178kB/s
Collecting pytz (from django)
Using cached pytz-2017.2-py2.py3-none-any.whl
Installing collected packages: pytz, django
Successfully installed django-1.11.4 pytz-2017.2
"""
pip freeze
# 创建django
django-admin.py startproject program
ls
cd program
ls
# 创建完成
网友评论