kivy的安装依赖比较多,这里对安装作简单记录。
1.Ubuntu18系统中安装
首先用apt-get命令安装依赖包
sudo apt-get install python3-opencv python3-pil python3-opencv python3-opengl python3-sdl2 cython3 libgstreamer1.0-0 python3-kivy python3-sdl2 python3-pip
以下为安装python-for-android依赖:
git android-sdk android-ndk google-android-ndk-installer ant openjdk-11-jdk zlib1g libncurses5 unzip
其次用pip3安装kivy及其依赖库
sudo pip3 install pygame kivy
2.Fedora 27系统中安装
首先用dnf命令安装依赖包
sudo dnf install git SDL2_ttf.x86_64 gstreamer.x86_64 python3-gstreamer1.x86_64 gcc redhat-rpm-config g++ python3-devel.x86_64 mesa-libGL-devel.x86_64 opencv.x86_64 SDL2.x86_64 SDL2_image.x86_64 SDL2_mixer.x86_64 mingw64-SDL2_mixer.noarch
然后用pip3安装python库
sudo pip3 install --user 用户名 pillow opencv-python PyOpenGL pygame cython==0.25.2 kivy