我无法在带有py3.5的Windows 10上安装kivy
我无法在Windows 10上安装kivy.我该怎么办?这是错误.
I can't install kivy on windows 10. What can i do? Here are errors.
C:\WINDOWS\system32>python -m pip install kivy
Collecting kivy
Using cached kivy-1.9.1.tar.gz
Requirement already satisfied: Kivy-Garden>=0.1.4 in c:\users\kenan\appdata\local\programs\python\python35-32\lib\site-packages (from kivy)
Requirement already satisfied: requests in c:\users\kenan\appdata\local\programs\python\python35-32\lib\site-packages (from Kivy-Garden>=0.1.4->kivy)
Building wheels for collected packages: kivy
Running setup.py bdist_wheel for kivy ... error
Complete output from command 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:
Using 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
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\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.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
----------------------------------------
Failed building wheel for kivy
Running setup.py clean for kivy
Failed to build kivy
Installing collected packages: kivy
Running setup.py install for kivy ... error
Complete output from command 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:
Using 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
----------------------------------------
Command "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" failed with error code 1 in C:\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\kivy\*
-
安装PIP
Install PIP
升级画中画
安装Microsoft CPP构建工具. Google,如果此链接损坏,您可以轻松找到它.
Install Microsoft CPP BUILD TOOLS. Google it, you can find it easily if this link is broken.
从以下位置下载Kivy软件包 http://www.lfd.uci.edu/~gohlke/pythonlibs/# pygame 问题不支持车轮包装".只是寻找 带有/不带有AMD的win32软件包.不过,如果您继续得到 相同的错误,只需尝试下载其他软件包并按照 以下步骤.让我下载了3个软件包来正确安装它.
Download Kivy Package from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame You might face issues of "Wheel package is not supported". Just look for the package with win32 with/without AMD. Still, if you keep getting the same error, Just try downloading the different package and follow the following steps. Took me to download 3 Packages to get it right.
打开CMD
将目录更改为下载"(或程序包所在的任何位置) 下载)
Change Directory to Downloads (Or wherever the package is downloaded)
执行pip install completePackageName.whl
例如:C:\Users\UserName\Downloads>pip install
Kivy-1.9.1+sdl2-cp35-cp35m-win32.whl
Ex: C:\Users\UserName\Downloads>pip install
Kivy-1.9.1+sdl2-cp35-cp35m-win32.whl