今天倒腾了一下django,来个入门的吧,网上很多帖子安装容易报错;直接上图说话;
mac django install
root 账户下的安装:
sudo easy_install pip
pip install Django==1.7
报错:
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.
容易失败
重新进入页面,下载源码安装:
1.进入
https://www.djangoproject.com/download/
2.下载
wget
3.安装
cd Django-1.x.ysudo python setup.py install
4.创建
django-admin.py startproject testdj
5.启动
cd testdj # 切换到我们创建的项目
python manage.py runserver