通过Makefi安装Kivy

2024-10-01 07:15:57 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在绞尽脑汁想办法在Linux上安装Kivy。我对几乎所有东西都是新手,所以这并不奇怪,但我正在尝试制作一个Makefile,为我通过Kivy构建的应用程序安装必要的依赖项。你知道吗

这是我的生成文件:

#!/bin/sh
all: packages program

packages:
    sudo apt-get install python3-kivy
    sudo apt-get install python3-pip
    sudo apt-get install python-setuptools python-dev build-essential 
    sudo apt-get install python3-dev
    sudo apt-get docutils-doc python3-pygame python-pil-doc python3-pil-dbg ttf-bitstream-vera
    sudo easy_install pip
    sudo apt-get -f install
    pip install --upgrade pip
    pip3 install python3-weather-api
    sudo pip install requests
    pip3 install beautifulsoup4
    pip3 install Cython
    pip3 install h5py
    pip3 install kivy

program: 
    python3 project.py

这是输出:

 sudo apt-get install python3-kivy
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    python3-kivy is already the newest version (1.10.0-0~stable0+201708191146~pkg175~ubuntu16.04.1).
    You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet dependencies:
     python3-kivy : Depends: python3-kivy-common (= 1.10.0-0~stable0+201708191146~pkg175~ubuntu16.04.1) but it is not going to be installed
                    Depends: python3-kivy-bin (= 1.10.0-0~stable0+201708191146~pkg175~ubuntu16.04.1) but it is not going to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
    Makefile:5: recipe for target 'packages' failed

它一直说要运行apt-get -f install,我也这么做了,但同样的错误不断出现。你知道吗


Tags: installpiptogetispackagespip3sudo