首页 文章

我不能用py3.5在windows 10上安装kivy

提问于
浏览
0

我无法在Windows 10上安装kivy . 我该怎么办?这是错误 .

C:\ WINDOWS \ system32> python -m pip install kivy收集kivy使用缓存的kivy-1.9.1.tar.gz要求已经满足:Kivy-Garden> = 0.1.4 in c:\ users \ kenan \ appdata \ local \ programs \ python \ python35-32 \ lib \ site-packages(来自kivy)要求已经满足:c:\ users \ kenan \ appdata \ local \ programs \ python \ python35-32 \ lib \ site-packages中的请求(来自Kivy) -Garden> = 0.1.4-> kivy)为收集的包构建轮子:kivy运行setup.py bdist_wheel for kivy ... error从命令C完成输出:\ Users \ kenan \ AppData \ Local \ Programs \ Python \ Python35- 32 \ python.exe -u -c“import setuptools,tokenize; file = 'C:\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\kivy\setup.py'; f = getattr(tokenize,'open',open)( file ); code = f.read() . replace('\r\n','\n'); f . close(); exec(compile(code, file ,'exec'))“bdist_wheel -d C:\ Users \ kenan \ AppData \ Local \ Temp \ tmp86qekmsbpip-wheel- --python-tag cp35:使用distutils

检测到Cython版本0.23检测到用户分布,避免便携命令 . 检测到Windows平台,强制使用GLEW . 使用此图形系统:OpenGL警告:运行pkg-config时出现问题--libs --cflags gstreamer-1.0(代码1)

b“'pkg-config'不被识别为内部或外部命令,\ r \ noperable程序或批处理文件 . \ r \ n”

警告:运行pkg-config时出现问题--libs --cflags sdl2 SDL2_ttf SDL2_image SDL2_mixer(代码1)

b“'pkg-config'不被识别为内部或外部命令,\ r \ noperable程序或批处理文件 . \ r \ n”

构建配置为:* use_rpi = 0 * use_mali = 0 * use_egl = 0 * use_opengl_es2 = 0 * use_opengl_debug = 0 * use_glew = 1 * use_sdl2 = 0 * use_ios = 0 * use_mesagl = 0 * use_x11 = 0 * use_gstreamer = 0 * use_avfoundation = 0 * use_osx_frameworks = 0 * debug_gl = 0 * debug = False

检测到的编译器是msvc

C:\ Program Files \ Microsoft Visual Studio 14.0 \ VC \ BIN \ cl.exe / c / nologo / Ox / W3 / GL / DNDEBUG / MD -IC:\ Users \ kenan \ AppData \ Local \ Programs \ Python \ Python35- 32 \ include -IC:\ Users \ kenan \ AppData \ Local \ Programs \ Python \ Python35-32 \ include“-IC:\ Program Files \ Microsoft Visual Studio 14.0 \ VC \ INCLUDE”“ - IC:\ Program Files \ Microsoft Visual Studio 14.0 \ VC \ ATLMFC \ INCLUDE“” - IC:\ Program Files \ Windows Kits \ 10 \ include \ 10.0.10240.0 \ ucrt“” - IC:\ Program Files \ Windows Kits \ NETFXSDK \ 4.6.1 \ include \嗯“”-IC:\ Program Files \ Windows Kits \ 10 \ include \ 10.0.10240.0 \ shared“” - IC:\ Program Files \ Windows Kits \ 10 \ include \ 10.0.10240.0 \ um“” - IC:\ Program Files \ Windows Kits \ 10 \ include \ 10.0.10240.0 \ winrt“/TcC:\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\kivy\kivy\graphics\vertex_instructions.c /Fobuild\temp.win32 -3.5 \ Release \ Users \ kenan \ AppData \ Local \ Temp \ pip-build-9ojxbuh8 \ kivy \ kivy \ graphics \ vertex_instructions.obj vertex_instructions.cc:\users\kenan\appdata\local\temp\pip-build-9ojxbuh8 \ kivy \ kivy \图形\ gl_redirect . h(8):致命错误C1083:无法打开包含文件:'GL / glew.h':没有这样的文件或目录错误:命令'C:\ Program Files \ Microsoft Visual Studio 14.0 \ VC \ BIN \ cl.exe'退出状态2失败


失败的构建轮为kivy运行setup.py clean for kivy无法构建kivy安装收集的软件包:kivy运行setup.py install for kivy ... error从命令C完成输出:\ Users \ kenan \ AppData \ Local \ Programs \ Python \ Python35-32 \ python.exe -u -c“import setuptools,tokenize; file = 'C:\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\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 C:\ Users \ kenan \ AppData \ Local \ Temp \ pip-9ucs7wug-record \ install-record.txt --single -version-external-managed --compile:使用distutils

Detected Cython version 0.23
User distribution detected, avoid portable command.
Windows platform detected, force GLEW usage.
Using this graphics system: OpenGL
WARNING: A problem occured while running pkg-config --libs --cflags gstreamer-1.0 (code 1)

b"'pkg-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"

WARNING: A problem occured while running pkg-config --libs --cflags sdl2 SDL2_ttf SDL2_image SDL2_mixer (code 1)

b"'pkg-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"


Build configuration is:
 * use_rpi = 0
 * use_mali = 0
 * use_egl = 0
 * use_opengl_es2 = 0
 * use_opengl_debug = 0
 * use_glew = 1
 * use_sdl2 = 0
 * use_ios = 0
 * use_mesagl = 0
 * use_x11 = 0
 * use_gstreamer = 0
 * use_avfoundation = 0
 * use_osx_frameworks = 0
 * debug_gl = 0
 * debug = False
Detected compiler is msvc
cythoning C:\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\kivy\kivy\graphics/vbo.pyx to C:\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\kivy\kivy\graphics\vbo.c
building 'kivy.graphics.vbo' extension
creating build\temp.win32-3.5
creating build\temp.win32-3.5\Release
creating build\temp.win32-3.5\Release\Users
creating build\temp.win32-3.5\Release\Users\kenan
creating build\temp.win32-3.5\Release\Users\kenan\AppData
creating build\temp.win32-3.5\Release\Users\kenan\AppData\Local
creating build\temp.win32-3.5\Release\Users\kenan\AppData\Local\Temp
creating build\temp.win32-3.5\Release\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8
creating build\temp.win32-3.5\Release\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\kivy
creating build\temp.win32-3.5\Release\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\kivy\kivy
creating build\temp.win32-3.5\Release\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\kivy\kivy\graphics
C:\Program Files\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\kenan\AppData\Local\Programs\Python\Python35-32\include -IC:\Users\kenan\AppData\Local\Programs\Python\Python35-32\include "-IC:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files\Windows Kits\10\include\10.0.10240.0\shared" "-IC:\Program Files\Windows Kits\10\include\10.0.10240.0\um" "-IC:\Program Files\Windows Kits\10\include\10.0.10240.0\winrt" /TcC:\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\kivy\kivy\graphics\vbo.c /Fobuild\temp.win32-3.5\Release\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\kivy\kivy\graphics\vbo.obj
vbo.c
c:\users\kenan\appdata\local\temp\pip-build-9ojxbuh8\kivy\kivy\graphics\gl_redirect.h(8): fatal error C1083: Cannot open include file: 'GL/glew.h': No such file or directory
 error: command 'C:\\Program Files\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2

----------------------------------------

命令"C:\Users\kenan\AppData\Local\Programs\Python\Python35-32\python.exe -u -c " import setuptools,tokenize; file = 'C:\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\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 C:\Users\kenan\AppData\Local\Temp\pip-9ucs7wug-record\install-record.txt --single-version-externally-managed --compile"失败,错误代码1在C:\ Users \ kenan \ AppData \ Local \ Temp \ pip-build-9ojxbuh8 \ kivy **

2 回答

  • 0

    安装PIP

    升级PIP

    安装Microsoft CPP BUILD工具:http://landinghub.visualstudio.com/visual-cpp-build-tools

    http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame下载Kivy Package您可能会遇到"Wheel package is not supported"的问题 . 只需查看带有/不带AMD的win32包 . 尽管如此,如果您仍然遇到相同的错误,请尝试下载不同的包并按照以下步骤操作 . 我已经下载了3个软件包以使其正确无误 .

    打开CMD

    将目录更改为下载(或者下载软件包的任何地方)

    pip install completePackageName.whl

    例如: C:\Users\UserName\Downloads>pip install Kivy-1.9.1+sdl2-cp35-cp35m-win32.whl

  • 0

    Kivy现在有3.4,3.5,3.6个轮子,无需编译 . 见installation documentation . 错误是因为你试图从pip安装Kivy,现在只有 stable 版本(1.9.1),这有点旧,代码 doesn't 支持py3.5及更高版本 .


    MSVC需要一些调整和补丁 . 整个说明都是拉取请求,但这些仍然是实验性的需要修复指针不匹配(另一个拉取请求) .

    否则Kivy(至少对于py3.4及更低版本)使用 gcc . 怎么编写是here

    但是,对于临时使用,您不需要编译,因为有轮子 . 如果您正确阅读docs,您将了解如何安装它 .

    如果您遇到 Window 错误,请在此处搜索,已经回答了问题 .

    某些地方甚至还有非正式的py3.5轮子 .

相关问题