网上找了很多安装flask的方法可惜废话太多,真是蛋疼,不过最后还是搞好了,简单的说一些,省去一些废话,直接开搞(我的系统是ubuntu的)
1.sudo apt-get install openssh-server
2.dpkg --list|grep ssh
3.sudo passwd
4.python --version
5.sudo apt-get install python-setuptools
6.sudo easy_install virtualenv
7.sudo apt-get install python-virtualenv
8.sudo easy_install Flask
9.好接下来测试一下吧
把下面文件复制粘贴保存为hello.py
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello World!'
if __name__ == '__main__':
app.run()
10.python hello.py
11.lynx http://localhost:5000
1.sudo apt-get install openssh-server
2.dpkg --list|grep ssh
3.sudo passwd
4.python --version
5.sudo apt-get install python-setuptools
6.sudo easy_install virtualenv
7.sudo apt-get install python-virtualenv
8.sudo easy_install Flask
9.好接下来测试一下吧
把下面文件复制粘贴保存为hello.py
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello World!'
if __name__ == '__main__':
app.run()
10.python hello.py
11.lynx http://localhost:5000