NVS Abhilash
NVS Abhilash

Reputation: 577

Unable to install Kivy v1.10.0 with Python 3.6.0

I am facing problems installing Kivy (v1.10.0) with Python 3.6.0. But it is working completely fine with Python 2.7.12, and Python 3.5.2. I want to work with Python 3.6.0.

My System: 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'

I have followed steps for stable install from here.

I want to know how to make work Kivy with Python 3.6.0?

Upvotes: 0

Views: 2255

Answers (3)

joyingaming
joyingaming

Reputation: 11

I am running Ubuntu 16.04 and running Eclipse Oxygen 2018. I installed pip and wanted to run python3.6

(1) sudo pip3.6 install python3.6

(2) sudo apt-get update

(3) sudo pip3.6 install cython

  1. sudo pip3.6 install kivy

To test python3.6 from command line terminal

next >>> import cython if no error gonna work in 3.6

next >>> import kivy your golden no error on my system.

So the cool part is now I can use this integrated with eclipse. Happy Coding hope this helps..

Upvotes: 1

yoel
yoel

Reputation: 315

The same thing happened to me. After reading one of the comments here, I installed a few more packages to get it to work (not sure if all of them are necessary)

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

Then, I made a new virtualenv and installed specifically Cython==0.25.2:

mkvirtualenv kivyinstall -p python3.6 workon kivyinstall pip install Cython==0.25.2 pip install Kivy==1.10.0

This worked. Using the latest Cython version didn't work for me unfortunately. I wonder when this will be tested by the Kivy guys. In Kivy's installation page it's written that Cython==0.25 is the recommended version but Cython has moved on since then.

Upvotes: 1

Tshirtman
Tshirtman

Reputation: 5947

How did you install it? i have it working here in a 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.

(disregard the fact that i use activate.fish, because i use the fish shell, use the correct activate for your shell)

gabriel@gryphon:/tmp> . .testvenv/bin/activate.fish 

install 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

and finally install 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

testing it

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]
>>>  

Upvotes: 1

Related Questions