[英]Kivy for Python 3 on a Mac OS X
I was wondering if kivy
supports Python 3 on Mac OS X systems. 我想知道
kivy
支持Mac OS X系统上的Python 3。 From the download page from the kivy
official website, it seems that kivy-1.9.0
is available for Python 3.4 for Windows systems, but it does not seem to support Python 3 on Mac OS X: 从
kivy
官方网站的下载页面kivy
,似乎kivy-1.9.0
适用于Windows系统的Python 3.4,但它似乎不支持Mac OS X上的Python 3:
Mac OS X Mac OS X 10.9, 10.10 (requires Python 2.7)
Mac OS X Mac OS X 10.9,10.10(需要Python 2.7)
Kivy-1.9.0-rev3-osx.dmg (Mirror)Kivy-1.9.0-rev3-osx.dmg(镜像)
This seems a little but nonsensical, why kivy should support Python 3 on Windows but not on a Mac OS X? 这似乎有点但没有意义,为什么kivy应该在Windows上支持Python 3但在Mac OS X上不支持? It could be because of the missing support of PyGame for Python 3 for OS X systems?
可能是因为PyGame缺少对Python 3系统的Python 3的支持? Actually, there's a way to install PyGame for OS X systems for Python 3, so I do not understand why they do not fix this problem, if this is really a problem.
实际上,有一种方法可以为Python 3安装PyGame for OS X系统,所以我不明白为什么他们不解决这个问题,如果这真的是一个问题。
I have also tried to install it globally via pip3
using: 我还试图通过
pip3
全局安装它:
sudo pip3 install kivy
But I am getting the following error: 但是我收到以下错误:
Collecting kivy Downloading Kivy-1.9.0.tar.gz (16.2MB) 100% |████████████████████████████████|
收集kivy下载Kivy-1.9.0.tar.gz(16.2MB)100%|███████████████████████████████ █| 16.2MB 34kB/s Complete output from command python setup.py egg_info:
16.2MB 34kB / s来自命令python setup.py egg_info的完整输出:
Cython is missing, its required for compiling kivy ! Traceback (most recent call last): File "<string>", line 20, in <module> File "/private/tmp/pip-build-qt70t_44/kivy/setup.py", line 173, in <module> from Cython.Distutils import build_ext ImportError: No module named 'Cython' ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-qt70t_44/kivy
You will need to build from source . 您需要从源代码构建 。
As a previous poster mentioned, you will need to get Cython installed. 如前面提到的海报,你需要安装Cython。
To get the latest version, use 要获取最新版本,请使用
$ pip3 install cython
From there, you need to modify setup.py. 从那里,您需要修改setup.py。 Here's an example of how I did it.
这是我如何做到的一个例子。
According to the error message, you are missing the package cython
: 根据错误消息,您缺少包
cython
:
Cython is missing, its required for compiling kivy !
...
ImportError: No module named 'Cython'
You should run pip install cython
. 你应该运行
pip install cython
。 Then installing from source worked for me, by opposition to using pip
. 然后从源代码安装为我工作,反对使用
pip
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.