2018年7月19日 星期四
Install Python 3.6.X on CentOS 7
Install Python 3.6.X on CentOS 7
=======================================
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
yum -y install python36
yum -y install python36u-devel
yum -y install python36u-libs
yum -y install python36u-pip
pip3.6 install --upgrade pip
pip3.6 install line-bot-sdk
pip3.6 install simplejson
pip3.6 install responses
pip3.6 install flask
pip3.6 install pyinstaller
=====================================
Python Flask Test
test.py
#!/bin/python3.6
from flask import Flask
app = Flask(__name__)
@app.route("/")
def index():
return "Hello from FLASK"
if __name__ == "__main__":
app.run(host='127.0.0.1')
======================================
Apache Proxy Setting
proxy.conf
<VirtualHost *:80>
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost On
<Location "/test">
ProxyPass "http:///127.0.0.1:5000"
ProxyPassReverse "http://127.0.0.1:5000"
</Location>
</VirtualHost>
===========================================
https://www.pyinstaller.org/
PyInstaller Quickstart
Install PyInstaller from PyPI:
pip install pyinstaller
Go to your program’s directory and run:
pyinstaller yourprogram.py
This will generate the bundle in a subdirectory called dist.
For a more detailed walkthrough, see the manual.
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言