2018年5月1日 星期二

pygattlib on Raspberry Pi

pkg-config
libboost-python-dev
libboost-thread-dev
libbluetooth-dev >= 4.101
libglib2.0-dev
python-dev




References :
mbientlab/pygattlib
筆記, 抓取小米花花草草監測儀的數據資料 (Mi Flora, Bluetooth Low Energy) - 大兵萊恩 一路直前

fatal error: boost/python/list.hpp: No such file or directory

sudo apt-get install libboost-python-dev




References :
OscarAcena / pygattlib / issues / #38 - Build fails on boost/python/list.hpp — Bitbucket

fatal error: bluetooth/bluetooth.h: No such file or directory

sudo apt-get install libbluetooth-dev




References :
c - Where is the bluetooth/bluetooth.h located in Linux? - Stack Overflow

No package 'glib-2.0' found

sudo apt-get install libgtk2.0-dev




References :
[SOLVED] No package 'glib-2.0' found?

2018年4月5日 星期四

強制 Gunicorn 使用 Python 3

$ vi run_gunicorn.py

#-*- coding: utf-8 -*-
import re
import sys
from gunicorn.app.wsgiapp import run
if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$','',sys.argv[0])
    sys.exit(run())

$ python3 run_gunicorn.py -w 4 -b 0.0.0.0:5000 main:app




References :

2018年3月7日 星期三