Python 開發安卓Android及IOS應用庫Kivy安裝嘗試:
先來看看這貨可以用來制作什么應用:
- Create a package for Windows
- Create a package for Android
- Creating packages for OS X
- Create a package for IOS
逆天的節奏啊,雖然600+頁的英文文檔,python3+還在on the way ,覺得這貨潛力無窮啊。
當然,缺點就是要安裝各種環境依賴,尤其是在win7平台下,估計會比較惱火,可以慢慢嘗試。
Installation¶(安裝)
Now that python is installed, open the Command line and make sure python is available by typing python --version. Then, do the following to install.
(首先你要確定Python已經安裝,打開win+R打開Command,確保python是在2.7下運行,然后按照一下步驟操作。另,建議建立虛擬環境進行開發,好處就不贅述;用python2.7的原因是在生成安卓APP的時候,暫且不支持高版本的python。)
Ensure you have the latest pip and wheel:(確保你安裝的是最新的pip和wheel)
python -m pip install --upgrade pip wheel setuptools
Install the dependencies (skip gstreamer (~90MB) if not needed, see Kivy’s dependencies):(安裝環境依賴:gstreamer這貨大約90M,主要是用來調用攝像頭,視頻等設備或播放,遇到了想裝再說,畢竟現階段處於試水階段)
python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew kivy.deps.gstreamer --extra-index-url https://kivy.org/downloads/packages/simple/
(趕腳這玩意安裝就跟Flask的擴展是一個思路,也可以用requirements.txt吧)
Install kivy:
python -m pip install kivy
(安裝kivy)
That’s it. You should now be able to import kivy in python.(可以在python下嘗試一下能不能import,會出現3條友好的warning,看看即可)
NoteI(注意)
If you encounter any permission denied errors, try opening the Command prompt as administrator and trying again.
(如果中途安裝出現了什么幺蛾子,建議切換至管理員權限,在進行以上操作,PS本人安裝沒有問題,人品還行!)