A, win10 installation virutalenv
Open cmd
Why not powershell? Since then activate powershell start the virtual environment when an error, and the command window is activated, this is a big bug.
pip install virtualenv
pip install virtualenvwrapper
1, to create a virtual environment
Select a file to store the virtual environment, such as D: \ Python
cd D:python3 # 进入该文件
virtualenv envname # 创建一个名字为envname的虚拟环境
dir # 查看当前目录可以知道一个envname的文件已经被创建
virtualenv -p python2 envname # 如果安装了多个python版本,如py2和py3,需要指定使用哪个创建虚拟环境
note:
If the command is not recognized virtualenv, may not be added to the python installation path or system environment variables virtualenv not installed or not re-open a window cmd;
2, start the virtual environment
# 进入虚拟环境文件
cd envname
# 进入相关的启动文件夹
cd Scripts
activate # 启动虚拟环境
deactivate # 退出虚拟环境
3, installation mysql5.7
Installation Tutorial MySQL5.7
How Win10 hide file extensions? Methods Win10 system removes the file name suffix
python3.6+django
Enter the virtual environment
1, install django
pip install django==2.0.6
2. Create a django project
django-admin startproject django01
3, start the service
manage.py runserver
4, create app
manage.py startapp MyApp
vscode configure the development environment
1, the installation vscode
2, the configuration vscode + python development environment
Open VSCode
. 1, mounted python plug
2 mounted Chinese extended package
3, the setup icon to directory Attractive
4, is provided
a path to a virtual environment provided python path
virtual environment python directory configuration
virtual path configuration environment
VSCode variables