安装依赖
yum -y install epel-release
yum -y install python-pip
pip install pyinstaller
pip install --upgrade pip
安装web.py
pip install web.py
github获取最新版安装,解压
git clone git://github.com/webpy/webpy.git
yum install unzip -y
unzip xxx
cd /root/webpy-master/web
vim 1.py
import web
urls = ('/', 'index')
app = web.application(urls, globals())
class index:
def GET(self):
return "Hello world!"
if __name__ == "__main__":
app.run()
执行
python 1.py 8888
访问浏览器
使用pip命令卸载
pip uninstall -y web.py
装flask方法1
pip install flask
执行
python app.py
装flask方法2
git clone https://github.com/pallets/flask
cd flask
python setup.py install