我在使用Python v1.10.0
安装Kivy(3.6.0
)时遇到问题。但它与Python 2.7.12
和Python 3.5.2
完全正常。我想使用Python 3.6.0
。
我的系统:Ubuntu 16.04 64-Bit
Python 2.7.12:
>>> import kivy
[INFO ] [Logger ] Record log in /home/nvs/.kivy/logs/kivy_17-08-31_5.txt
[INFO ] [Kivy ] v1.10.0
[INFO ] [Python ] v2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609]
Python 3.5.2
>>> import kivy
[INFO ] [Logger ] Record log in /home/nvs/.kivy/logs/kivy_17-08-31_6.txt
[INFO ] [Kivy ] v1.10.0
[INFO ] [Python ] v3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609]
Python 3.6.0:
>>> import kivy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'kivy'
我已遵循here的稳定安装步骤。
我想知道如何使用Python 3.6.0
制作工作Kivy?
答案 0 :(得分:1)
同样的事发生在我身上。 阅读其中一条评论here后,我又安装了一些软件包以使其正常工作(不确定是否所有评论都是必要的)
count
然后,我制作了一个新的virtualenv并特别安装了Cython == 0.25.2:
apt-get install python3.6 idle-python3.6 python3.6-doc python3.6-examples libpython3.6 libpython3.6-stdlib python-clang-3.6 python-lldb-3.6 libpython3.6-dbg python3.6-venv
这很有用。不幸的是,使用最新的Cython版本并不适用于我。 我想知道这将由Kivy家伙测试。在Kivy's installation page中写道,Cython == 0.25是推荐的版本,但Cython从那时起就开始了。
答案 1 :(得分:1)
我正在运行Ubuntu 16.04和Eclipse Oxygen2018。我安装了pip 并想运行python3.6
(1)sudo pip3.6安装python3.6
(2)sudo apt-get更新
(3)sudo pip3.6安装cython
要从命令行终端测试python3.6
下一个>>>如果在3.6中没有错误将导入cython
下一步>>>导入kivy,在我的系统上没有任何错误。
所以最酷的部分是我现在可以将其与eclipse集成使用。 开心编码希望对您有所帮助。
答案 2 :(得分:0)
你是如何安装它的?我让它在virtualenv中工作
gabriel@gryphon:/tmp> virtualenv -p python3.6 .testvenv
Running virtualenv with interpreter /usr/bin/python3.6
Using base prefix '/usr'
New python executable in /tmp/.testvenv/bin/python3.6
Also creating executable in /tmp/.testvenv/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
(无视我使用activate.fish的事实,因为我使用鱼壳,为你的shell使用正确的激活)
gabriel@gryphon:/tmp> . .testvenv/bin/activate.fish
安装cython
(.testvenv) 11:46:29 02/09/17 1,47.testvenv 0
gabriel@gryphon:/tmp> pip install cython
Collecting cython
Using cached Cython-0.26.1-cp36-cp36m-manylinux1_x86_64.whl
Installing collected packages: cython
Successfully installed cython-0.26.1
最后安装kivy
gabriel@gryphon:/tmp> pip install kivy
Collecting kivy
Using cached Kivy-1.10.0.tar.gz
Collecting Kivy-Garden>=0.1.4 (from kivy)
Collecting docutils (from kivy)
Using cached docutils-0.14-py3-none-any.whl
Collecting pygments (from kivy)
Using cached Pygments-2.2.0-py2.py3-none-any.whl
Collecting requests (from Kivy-Garden>=0.1.4->kivy)
Using cached requests-2.18.4-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests->Kivy-Garden>=0.1.4->kivy)
Using cached urllib3-1.22-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests->Kivy-Garden>=0.1.4->kivy)
Using cached certifi-2017.7.27.1-py2.py3-none-any.whl
Collecting idna<2.7,>=2.5 (from requests->Kivy-Garden>=0.1.4->kivy)
Using cached idna-2.6-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests->Kivy-Garden>=0.1.4->kivy)
Using cached chardet-3.0.4-py2.py3-none-any.whl
Building wheels for collected packages: kivy
Running setup.py bdist_wheel for kivy ... done
Stored in directory: /home/gabriel/.cache/pip/wheels/44/dc/e1/8f36be467f9d8c3b27d172a64a55b887212b86727684ca18e8
Successfully built kivy
Installing collected packages: urllib3, certifi, idna, chardet, requests, Kivy-Garden, docutils, pygments, kivy
Successfully installed Kivy-Garden-0.1.4 certifi-2017.7.27.1 chardet-3.0.4 docutils-0.14 idna-2.6 kivy-1.10.0 pygments-2.2.0 requests-2.18.4 urllib3-1.22
测试它
gabriel@gryphon:/tmp> python
Python 3.6.1 (default, Mar 22 2017, 06:17:05)
[GCC 6.3.0 20170321] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import kivy
[INFO ] [Logger ] Record log in /home/gabriel/.kivy/logs/kivy_17-09-02_1.txt
[INFO ] [Kivy ] v1.10.0
[INFO ] [Python ] v3.6.1 (default, Mar 22 2017, 06:17:05)
[GCC 6.3.0 20170321]
>>>