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