django环境初始化


参考:https://code.ziqiangxuetang.com/django/django-install.html 自强学堂

1.选择系统阿里云 CentOS Linux release 7.3.1611 (Core) 

2.自带了Python 2.7.5

3.安装连接mysql包

yum install MySQL-python

4.安装django

# pip install Django==1.8.16
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Collecting Django==1.8.16
  Downloading http://mirrors.aliyun.com/pypi/packages/5c/38/7324791951945b7fa0ba5c6dd57cff12ac544a260e110b2509cda6ced2f8/Django-1.8.16-py2.py3-none-any.whl (6.2MB)
    100% |████████████████████████████████| 6.2MB 70.0MB/s 
Installing collected packages: Django
Successfully installed Django-1.8.16

 检查是否安装成功

>>> import django
>>> django.VERSION
(1, 8, 16, 'final', 0)

 

对应win7 pycharm上安装MySQLdb-Python 报错解决方案

pip install MySQL-python

报错:error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat).

解决:下载 MySQL-python-1.2.3.win-amd64-py2.7.exe 安装

https://www.codegood.com/downloads


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM