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. navigater导航

    1.css的hover事件2.url事件(或者click事件),激活当前项3.第一导航与第二导航的移入移出事件(可以通过left,top值来显示,也可以变化宽度,高宽来显示)4.有二级导航的另外给cl ...

  2. 【BZOJ4236】JOIOJI STL

    [BZOJ4236]JOIOJI Description JOIOJI桑是JOI君的叔叔.“JOIOJI”这个名字是由“J.O.I”三个字母各两个构成的. 最近,JOIOJI桑有了一个孩子.JOIOJ ...

  3. 一个Activity中使用两个layout实例

    package com.sbs.aas2l; import android.app.Activity; import android.os.Bundle; import android.view.Vi ...

  4. C++中堆和栈的完全解析

    C++中堆和栈的完全解析 内存分配方面: 堆: 操作系统有一个记录空闲内存地址的链表,当系统收到程序的申请时,会遍历该链表,寻找第一个空间大于所申请空间的堆结点,然后将该结点从空闲结点链表中删 除,并 ...

  5. php中 const 与define()的区别 ,选择

    来自: http://stackoverflow.com/questions/2447791/define-vs-const 相同点: 两者都可以定义常量 const FOO = 'BAR'; def ...

  6. 数据去重优化 MemoryError 内存不足

    from ProjectUtil.usingModuleTOMODIFY import getNow export_q_f, q_l, start_ = '/mnt/mongoexport/super ...

  7. 2.wireshark分析之TCP协议(一)

    (1) TCP是怎么样的协议? TCP是一种面向连接(连接导向)的.可靠的基于字节流的传输层通信协议.TCP将用户数据打包成报文段,它发送后启动一个定时器,另一端收到的数据进行确认.对失序的数据重新排 ...

  8. COURSES---poj1469 hdu1083(最大匹配)

    题目链接:http://poj.org/problem?id=1469   http://acm.hdu.edu.cn/showproblem.php?pid=1083 题意:有n个学生p门课, 每门 ...

  9. python使用tesseract-ocr完成验证码识别

    全自动区分计算机和人类的公开图灵测试(Completely Automated Public Turing test to tell Computers and Humans Apart) 简称CAP ...

  10. arc 和 非arc兼容

    1,选择项目中的Targets,选中你所要操作的Target, 2,选Build Phases,在其中Complie Sources中选择需要ARC的文件双击, 并在输入框中输入:-fobjc-arc ...