错误:无法为使用 PEP 517 且无法直接安装的 Kivy 构建轮子

2022-01-15 00:00:00 python kivy windows cmd

问题描述

我一直在尝试在 windows10 机器上安装 kivy,但没有得到预期的输出,相反,我收到了一系列奇怪的错误消息.首先我运行了以下命令:

I've been trying to install kivy on windows10 machine and I did not get an expected output, instead, I got a series of weird error messages. First I ran the following commands:

python -m pip install --upgrade pip wheel setuptools
python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew
python -m pip install kivy.deps.gstreamer
python -m pip install kivy.deps.angle
python -m pip install pygame

据我所知,一切都很顺利.

And as far as I know, everything went right.

之后,我运行了这个命令:python -m pip install https://github.com/kivy/kivy/archive/master.zip

After that, I ran this command: python -m pip install https://github.com/kivy/kivy/archive/master.zip

命令输出帮助我分解了执行它的过程.

Command output helped me break down the process of executing it.

首先我在获取制造轮子的要求"时收到一条错误消息.

First I got an error message while "Getting requirements to build wheel".

错误信息:

我在准备轮子元数据"时收到此错误;和用于 Kivy (PEP 517) 的构建轮"也是.我觉得值得一提的是,每次我说错误发生时,它都发生了两次,一次又一次.

I got this error while "Preparing wheel metadata" and "Building wheel for Kivy (PEP 517)" as well. I think that it is worth mentioning that every time I said that error occurred, it occurred twice, one after another.

在那之后,我得到了一个巨大的错误:

After that, I got a huge error:

您可以通过以下链接下载带有错误消息的测试文件:https://filesend.standardnotes.org/send/BPQTjNM3aiUyRXOtfA3A#ZGI2ZDUzMWU2MmYzNTlhNTVlODEw

You can download the test file with an error message on this link: https://filesend.standardnotes.org/send/BPQTjNM3aiUyRXOtfA3A#ZGI2ZDUzMWU2MmYzNTlhNTVlODEw

注意:我执行的所有命令都是在管理员运行的cmd中执行的.

Note: All the commands that I executed were executed in cmd ran by the administrator.

如果有人能向我解释发生了什么,我将不胜感激!

If anyone can explain to me what is going on I would highly appreciate it!


解决方案

在这里解决相关问题 - 错误:无法为使用 PEP 517 且无法直接安装的钟摆制造轮子和 pip 无法为 scipy 构建轮子

Going by related issues here - ERROR: Could not build wheels for pendulum which use PEP 517 and cannot be installed directly and pip failing to build wheels for scipy

答案似乎表明降级 pip 版本可能会解决问题.但在此之前请尝试

The answers seem to suggest that downgrading pip version will likely solve the problem. But before that please try

pip install --upgrade pip setuptools wheel

代替

python -m pip install --upgrade pip wheel setuptools

看看能不能解决.如果没有,请通过执行来降级您的 pip

and see if it solves. If not, downgrade your pip by doing

python -m pip install --force-reinstall pip==18.1

如果这些都不起作用,那么您唯一可行的解​​决方案是在 Anaconda 中使用 Kivy.您可以从这里查看更多安装信息.

If none of these work then your only viable solution is to use Kivy within Anaconda. You can see more on installation from here.

相关文章