今天倒腾了一下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 Django-1.10.4.tar.gz
3.安装
cd Django-1.x.y sudo python setup.py install
4.创建
django-admin.py startproject testdj
5.启动
cd testdj # 切换到我们创建的项目
python manage.py runserver
时间: 2024-10-07 08:50:29