Home  >  Article  >  Backend Development  >  linux环境下安装pyramid和新建项目的步骤

linux环境下安装pyramid和新建项目的步骤

WBOY
WBOYOriginal
2016-06-06 11:28:171274browse

1. 安装python虚拟环境

代码如下:


virtualenv --no-site-packages env

2. 安装pyramid

代码如下:


$ env/bin/easy_install pyramid

3. 使用alchemy模板,创建一个项目

代码如下:


pcreate -s alchemy MyProject

4. 安装项目的依赖

代码如下:


python setup.py develop

5. 运行单元测试

代码如下:


python setup.py test –q

6. 安装初始化数据库脚本

代码如下:


env/bin/initialize_[projectname]_db development.ini

7. 启动网站

代码如下:


pserve development.ini --reload


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn