reference: 《Flask Web 开发》

Environment

Python 3

Mac OSX

Introductory Chapter: 安装

1.安装第三方工具 virtualenv

sudo easy_install virtualenv

显示其版本信息:

virtualenv --version
sh-3.2# virtualenv --version
15.1.0

2.git clone 文件夹用以保存代码:

git clone https://github.com/miguelgrinberg/flasky.git

cd flasky

git checkout 1a

3.在flasky中创建虚拟环境venv

virtualenv venv
sh-3.2# virtualenv venv
New python executable in /Users/wasdns/Desktop/flasky/venv/bin/python
Installing setuptools, pip, wheel...done.
sh-3.2# ls
.git LICENSE hello.py
.gitignore README.md venv

4.激活虚拟环境:

source venv/bin/activate

系统自动修改命令行提示符,加入环境名:

(venv) sh-3.2#

5.ps.如果想回到全局环境,执行:

deactivate

6.在虚拟环境中安装Flask:

pip install flask

检验:在python界面中导入flask模块。

(venv) sh-3.2# python
Python 2.7.10 (default, Oct 23 2015, 19:19:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import flask
>>>

成功安装Flask。

2017/2/14

Flask 1 Introductory Chapter的更多相关文章

  1. Hello Indigo

    Windows Communication Foundation (WCF),formerly code-named “Indigo,” is Microsoft’s platform for Ser ...

  2. Unity文档阅读 第一章 入门

    Before you learn about dependency injection and Unity, you need to understand why you should use the ...

  3. 智课雅思词汇---七、cur是什么意思

    智课雅思词汇---七.cur是什么意思 一.总结 一句话总结:词根:cur, curs ( cor, cour, cours, coars) = to run 1.cub是什么意思? 词根:cumb, ...

  4. Computer Networking: A Top Down Approach

    目录 Chapter 1: Computer Networks and the Internet 1. What is the Internet? 2. The Network Edge 3. The ...

  5. Computer Neworking: A Top-Down Approach

    目录 Chapter 1: Computer Networks and the Internet 1. What is the Internet? 2. The Network Edge 3. The ...

  6. Flask开发遇到的问题:BuildError: Could not build url for endpoint 'main.followers' with values ['username']. Did you mean 'main.user' instead?

    @(Flask Web Development 12th chapter) 描述 Flask开发中遇到BuildError: Could not build url for endpoint 'mai ...

  7. flask 未完待续

    Flask - 一个短小精悍.可扩展的一个Web框架很多可用的第三方组件:http://flask.pocoo.org/extensions/blogs:https://www.cnblogs.com ...

  8. (转)Introductory guide to Generative Adversarial Networks (GANs) and their promise!

    Introductory guide to Generative Adversarial Networks (GANs) and their promise! Introduction Neural ...

  9. 欢迎来到 Flask 的世界

    欢迎来到 Flask 的世界 欢迎阅读 Flask 的文档.本文档分成几个部分,我推荐您先读 < 安装 >,然后读< 快速上手 >.< 教程 > 比快速上手文档更详 ...

随机推荐

  1. java.lang.NoSuchMethodException:com.yxq.action.AdminAction.addGoods()《转载》

    java.lang.NoSuchMethodException:com.yxq.action.AdminAction.addGoods()   在学习struts2的时有时会出现此异常,现将其总结如下 ...

  2. you-get 下载网络上的富媒体信息

    You-Get 乃一小小哒命令行程序,提供便利的方式,下载网络上的富媒体信息. 利用you-get下载这个网页的视频: $ you-get http://www.fsf.org/blogs/rms/2 ...

  3. Egret的一些性能优化

    Egret的性能优化不知道在哪里啊,主要参考Laya的性能优化,都差不多 一.性能统计面板 index.html页面设置data-show-fps=true打开性能面板 性能统计面板说明 Egret没 ...

  4. [SQL] 常用查询脚本

    查询哪些存储过程使用了某个表 select b.name from syscomments a,sysobjects b where a.id=b.id and a.text LIKE '%ftblo ...

  5. oracle和mysql如何快速查看每个表的数据量?

    oracle: select t.table_name,t.num_rows from user_tables t ORDER BY NUM_ROWS DESC; mysql: use informa ...

  6. Xcode - 插件管理工具Alcatraz

    Alcatraz 1.简介 Alcatraz是一个能帮你管理Xcode插件丶模版及颜色配置的工具.它可以直接集成在Xcode的图形界面中,让你感觉就像在使用Xcode自带的功能一样. 2.安装和删除 ...

  7. mysql查杀会话

    root登陆mysql,查看会话(show processlist\G;): mysql> kill

  8. poj1961 & hdu1358 Period【KMP】

    Period Time Limit: 3000MS   Memory Limit: 30000K Total Submissions: 20436   Accepted: 9961 Descripti ...

  9. 第1章 1.6计算机网络概述--OSI参考模型

    ISO七层模式:国际标准组织对互联网通信规则进行的定义. 7.应用层:所有能产生网络流量的程序,如:QQ. 6.表示层:传输前对数据进行进行处理,是一种数据处理的规则,如:加密.压缩.传输二进制(图片 ...

  10. mysql 数据操作 单表查询 通过四则运算查询

    #通过四则运算查询 FROM employee; AS Annual_salary FROM employee; Annual_salary FROM employee; 查看年薪salary*12 ...