[Unbuntu]
1.先裝bluez
sudo apt-get install bluez
2.裝python
sudo apt-get install python
3.裝python開發套件 python-dev :不然編譯會出現"Python.h : no such file or directory
sudo apt-get install python-dev
4.裝Bluez開發函式庫 libbluetooth-dev :不然編譯會出現"bluez/btmodule.h.h: fatal error: bluetooth/bluetooth.h: No such file or directory,另外,gcc編譯時-lbluetooth也需要該函式庫
sudo apt-get install libbluetooth-dev
5.裝PyBluez
python setup.py install
[Windows]
1.裝PyBluez: 有對應windows平台的python .msi安裝檔可以下載使用
2.python-dev已經整合在.msi安裝檔裡面
"The concept of "python-dev package" is a Debian concept which doesn't
apply to Windows. The standard installation on Windows provides the
header and library files that you need for interfacing with C.
Don't put things where your C compiler can find them; do a standard
no-frills install of Python2.4 using the .msi installer and tell your C
compiler where the goodies are.
E.g. using the MinGW32 gcc, you'd need things like:
gcc -I\python24\include -lpython24 -L\python24\libs
[first is "i".upper(), second is "L".lower()]
沒有留言:
張貼留言