Build a Python virtual environment under Windows

Source: Internet
Author: User
Tags sqlite database virtual environment virtualenv

###################################
Test environment under Windows

C:\USERS\WONGG\DJANGO-CMDB>CD. \cmdb

# #下载get-pip.py
# # https://pip.pypa.io/en/stable/installing/

#安装pip
C:\users\wongg>python get-pip.py
Collecting Pip

#安装虚拟环境程序
C:\users\wongg>pip Install Virtualenv
Collecting virtualenv
Successfully installed virtualenv-15.2.0

#创建虚拟环境
C:\users\wongg>virtualenv cmdb-virtualenv

#进入虚拟环境
C:\users\wongg>cmdb-virtualenv\scripts\activate

#安装模块
(cmdb-virtualenv) C:\users\wongg>pip Install-r django-cmdb\docs\requirements

# Initialize dependent packages (one time)
git submodule init # synchronization Module
git submodule Update # updates Submodule
git submodule foreach python setup.py # install submodule to path dependent

# ensure the presence of local configuration files
Touch proj/environ/default.py

# Ensure that the log directory is created correctly
Mkdir-p/cnicg/base/log/cmdb # Linux
MD \cnicg\base\log\cmdb # Windows

# Create a database
Python manage.py Migrate
# If it is the default SQLite database, if you need to rebuild, delete the corresponding file can be
#删除django-cmdb\db\db.sqlite3

# import data
Python manage.py proj load--filename C:\Users\wongg\OneDrive\Niot work related \CMDB development related \ OPS resource management-online. xlsx

git fetch
git checkout Master
Git pull

#运行项目 (web)
(cmdb-virtualenv) c:\users\wongg>django-cmdb\manage.py Runserver

Build a Python virtual environment under Windows

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.