我正在尝试使用以下命令在WSL-1 (ubuntu 18.04)上安装kivy:
python3 -m pip install kivy但是,我遇到了以下错误:
mp/pip-build-wzqslc5f/kivy/kivy/include -I/usr/include/python3.6m -c /tmp/pip-build-wzqslc5f/kivy/kivy/graphics/context.c -o build/temp.linux-x86_64-3.6/tmp/pip-build-wzqslc5f/kivy/kivy/graphics/context.o
In file included from /tmp/pip-build-wzqslc5f/kivy/kivy/graphics/context.c:599:0:
/tmp/pip-build-wzqslc5f/kivy/kivy/include/gl_redirect.h:72:13: fatal error: GL/gl.h: No such file or directory
# include <GL/gl.h>
^~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-wzqslc5f/kivy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-23856ukx-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-wzqslc5f/kivy/在WSL上应该做哪些不同的事情?
发布于 2020-11-23 17:02:37
如果是这样,那么在您的系统上安装pip会在您的系统上产生两个包管理器,即。
我还在WSL上运行Ubuntu,根据经验,每当我需要安装python包时,我都会首先尝试使用apt找到它,然后只有在apt repo (或其他名称)中找不到它时才使用pip。
许多python包发布到apt repo,名称为python(v)-(pkg),例如python3-pip,python3-numpy等。因此,如果在WSL上全新安装Ubuntu,以下命令序列应该可以完成工作:
sudo apt update -y && sudo apt upgrade -y
sudo apt install -y python3-pip
sudo apt install -y python3-kivyhttps://stackoverflow.com/questions/64965114
复制相似问题