Django-搭建开发环境

pycharm安装

https://www.jetbrains.com/pycharm/

mysql安装

https://dev.mysql.com/downloads/windows/









python2.7安装

https://www.python.org/downloads/

navicatformysql.zip

virtual虚拟环境搭建-windows

优点

  • 使不同应用开发环境独立
  • 环境升级不影响其他应用,也不会影响全局的python环境
  • 防止系统中出现包管理混乱和版本冲突
virtuanlenv安装
#安装
pip install virtualenv

#创建虚拟环境
virtuanlenv testvir01

#进入虚拟环境目录
cd testvir01

#激活虚拟环境
activate.bat
virtuanlenv管理虚拟环境不变,故安装virtualenvwrapper进行虚拟环境管理!
安装virtualenvwrapper
  • Windows
C:\WINDOWS\system32>pip install virtualenvwrapper-win
Collecting virtualenvwrapper-win
Using cached https://files.pythonhosted.org/packages/87/70/ccebe989b112c42814fee4c145cfdac8fbcb174074b04bf8250b3052544f/virtualenvwrapper_win-1.2.5-py2-none-any.whl
Collecting virtualenv (from virtualenvwrapper-win)
Downloading https://files.pythonhosted.org/packages/b6/30/96a02b2287098b23b875bc8c2f58071c35d2efe84f747b64d523721dc2b5/virtualenv-16.0.0-py2.py3-none-any.whl (1.9MB)
100% |████████████████████████████████| 1.9MB 77kB/s
Installing collected packages: virtualenv, virtualenvwrapper-win
Successfully installed virtualenv-16.0.0 virtualenvwrapper-win-1.2.5
  • Linux
pip install virtualenvwrapper
创建虚拟环境
C:\WINDOWS\system32>mkvirtualenv testvir01
C:\Users\jianhu.yong\Envs is not a directory, creating
New python executable in C:\Users\jianhu.yong\Envs\testvir01\Scripts\python.exe
Installing setuptools, pip, wheel...done.

(testvir01) C:\Windows\System32>
退出虚拟环境
deactivate
查看虚拟环境
C:\Windows\System32>workon

Pass a name to activate one of the following virtualenvs:
==============================================================================
testvir01

C:\Windows\System32>
进入虚拟环境
C:\Windows\System32>workon testvir01
(testvir01) C:\Windows\System32>
Django安装
C:\Windows\System32>workon testvir01
(testvir01) C:\Windows\System32>pip install django==1.10.4
Collecting django==1.10.4
Downloading https://files.pythonhosted.org/packages/71/37/581a00bbc4571526ce88ef517c0c02ca7575ac2ae8a3671161d2aa14b740/Django-1.10.4-py2.py3-none-any.whl (6.8MB)
100% |████████████████████████████████| 6.8MB 28kB/s
Installing collected packages: django
Successfully installed django-1.10.4
pycharm和navicat简单实用
  • 设置keymap

  • 连接&创建数据库

upload successful
upload successful
upload successful

0%