Flask_RESTful_API_py35
使用 anaconda 工具来制作虚拟环境
conda create --name Flask_RESTful_API_py35 python=3.5
To activate this environment, use:
source activate Flask_RESTful_API_py35
To deactivate an active environment, use:
source deactivate
安装 flask
conda install flask
编写程序 app.py
#!flask/bin/python
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return "Hello, World!"
if __name__ == '__main__':
app.run(debug=True)
增加执行权限
chmod a+x app.py
运行
python app.py
image.png
image.png
网友评论