所以我一直在试着弄清楚如何做到这一点。我安装了Cython和Pygame,(或者至少Visual Studio这样说。)但每次运行setup.py时都说我没有Cython。
我曾尝试过使用Wheel,但它不断出现错误而不是安装。这是错误:
Installing 'C:\Users\paolo\Downloads\Kivy‑1.9.0‑cp34‑none‑win32.whl'
You are using pip version 6.0.8, however version 7.1.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
--- Logging error ---
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\pip\basecommand.py", line 232, in main
status = self.run(options, args)
File "C:\Python34\lib\site-packages\pip\commands\install.py", line 305, in run
name, None, isolated=options.isolated_mode,
File "C:\Python34\lib\site-packages\pip\req\req_install.py", line 164, in from_line
wheel = Wheel(link.filename) # can raise InvalidWheelFilename
File "C:\Python34\lib\site-packages\pip\wheel.py", line 504, in __init__
"%s is not a valid wheel filename." % filename
pip.exceptions.InvalidWheelFilename: Kivy\u20111.9.0\u2011cp34\u2011none\u2011win32.whl is not a valid wheel filename.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python34\lib\logging\__init__.py", line 980, in emit
stream.write(msg)
File "C:\Python34\lib\site-packages\pip\_vendor\colorama\ansitowin32.py", line 133, in write
self.write_and_convert(text)
File "C:\Python34\lib\site-packages\pip\_vendor\colorama\ansitowin32.py", line 161, in write_and_convert
self.write_plain_text(text, cursor, len(text))
File "C:\Python34\lib\site-packages\pip\_vendor\colorama\ansitowin32.py", line 166, in write_plain_text
self.wrapped.write(text[start:end])
File "C:\Python34\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2011' in position 4: character maps to <undefined>
Call stack:
File "C:\Python34\lib\runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "C:\Python34\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python34\lib\site-packages\pip\__main__.py", line 19, in <module>
sys.exit(pip.main())
File "C:\Python34\lib\site-packages\pip\__init__.py", line 217, in main
return command.main(cmd_args)
File "C:\Python34\lib\site-packages\pip\basecommand.py", line 243, in main
logger.critical(str(exc))
Message: 'Kivy\u20111.9.0\u2011cp34\u2011none\u2011win32.whl is not a valid wheel filename.'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\pip\basecommand.py", line 232, in main
status = self.run(options, args)
File "C:\Python34\lib\site-packages\pip\commands\install.py", line 305, in run
name, None, isolated=options.isolated_mode,
File "C:\Python34\lib\site-packages\pip\req\req_install.py", line 164, in from_line
wheel = Wheel(link.filename) # can raise InvalidWheelFilename
File "C:\Python34\lib\site-packages\pip\wheel.py", line 504, in __init__
"%s is not a valid wheel filename." % filename
pip.exceptions.InvalidWheelFilename: Kivy\u20111.9.0\u2011cp34\u2011none\u2011win32.whl is not a valid wheel filename.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python34\lib\logging\__init__.py", line 980, in emit
stream.write(msg)
File "C:\Python34\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2011' in position 4: character maps to <undefined>
Call stack:
File "C:\Python34\lib\runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "C:\Python34\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python34\lib\site-packages\pip\__main__.py", line 19, in <module>
sys.exit(pip.main())
File "C:\Python34\lib\site-packages\pip\__init__.py", line 217, in main
return command.main(cmd_args)
File "C:\Python34\lib\site-packages\pip\basecommand.py", line 243, in main
logger.critical(str(exc))
Message: 'Kivy\u20111.9.0\u2011cp34\u2011none\u2011win32.whl is not a valid wheel filename.'
Arguments: ()
'C:\Users\paolo\Downloads\Kivy‑1.9.0‑cp34‑none‑win32.whl' failed to install. Exit code: 1
我不知道如何安装它。任何帮助表示赞赏。
答案 0 :(得分:1)
我使用了“全包”Kivy-1.9.0-py3.4-win32-x64.exe并在win8.1上安装时没有任何问题。
为了获得一个IDE,我安装了PyCharm的社区版本,在我的情况下,这个版本也开始使用kivy。
总而言之,我最终得到了3个不同的py3安装,而不是试图为不同的包提供模糊的依赖关系/链接。
它似乎工作得很好,似乎并没有干扰我早先使用的Anaconda安装,但我仍在使用。
启动.py kivy文件的蝙蝠文件技巧也可以在我的电脑上工作(第一次拍摄)。
也许这是最简单的启动和运行方式(除非您绝对希望在特定情况下将安装解决为附加组件...)