community icon indicating copy to clipboard operation
community copied to clipboard

[kivy dev 1.9.2] No module named 'kivy._clock'

Open jligeza opened this issue 10 years ago • 29 comments

I've just installed kivy 1.9.2 dev for python 3.5 from the daily ppa, and running a very simple app throws this error:

[INFO   ] [Logger      ] Record log in /home/stefan/.kivy/logs/kivy_16-06-24_21.txt
[INFO   ] [Kivy        ] v1.9.2-dev0
[INFO   ] [Python      ] v3.5.1 (default, Dec 18 2015, 00:00:00)
[GCC 4.8.4]
 Traceback (most recent call last):
   File "main.py", line 3, in <module>
     from kivy.app import App
   File "/usr/local/lib/python3.5/dist-packages/kivy/app.py", line 319, in <module>
     from kivy.base import runTouchApp, stopTouchApp
   File "/usr/local/lib/python3.5/dist-packages/kivy/base.py", line 29, in <module>
     from kivy.clock import Clock
   File "/usr/local/lib/python3.5/dist-packages/kivy/clock.py", line 234, in <module>
     from kivy._clock import CyClockBase, ClockEvent
 ImportError: No module named 'kivy._clock'

jligeza avatar Jun 24 '16 20:06 jligeza

See https://github.com/kivy/kivy/pull/4412#issuecomment-228455735.

matham avatar Jun 24 '16 21:06 matham

@matham Any news on this issue? Kivy 1.9.2 can't be installed from the setup script in the repo either.

jligeza avatar Jul 14 '16 17:07 jligeza

@thopiekar is the one who maintains these ppas.

matham avatar Jul 14 '16 21:07 matham

Hey there. Broken package builds because of new modules/files?

thopiekar avatar Jul 14 '16 21:07 thopiekar

@thopiekar Yes, you were pinged about it by dessant in the comment link above.

jligeza avatar Jul 14 '16 22:07 jligeza

According to the logs the _clock module should be there. Eg. for Python3:

/usr/lib/python3/dist-packages/kivy/_clock.cpython-35m-x86_64-linux-gnu.so

Full build log: https://launchpadlibrarian.net/273104777/buildlog_ubuntu-yakkety-amd64.kivy_1.9.2-0~daily0+201607150447-3601-pkg131~ubuntu16.10.1_BUILDING.txt.gz

thopiekar avatar Jul 15 '16 08:07 thopiekar

@thopiekar The module is there, but for some reasons its impossible to import it or any of its content.

jligeza avatar Jul 15 '16 09:07 jligeza

@thopiekar I have fixed the issue by renaming all so files to *.so from *.cpython-34m-x86_64-linux-gnu.so. Why these files aren't just *.so?

jligeza avatar Jul 23 '16 16:07 jligeza

It is a convention on Ubuntu/Debian to make it possible to install different python releases at once. Additionally it makes it possible to install different architectures, too.

I see no reason why it fails. There is even a packaging tool, which cares about it. So honestly not my fault 🙄

thopiekar avatar Jul 23 '16 17:07 thopiekar

However strange that this happens here.

thopiekar avatar Jul 23 '16 17:07 thopiekar

Oh, wait the files are named for Python 3.4, but you've got Python 3.5 installed? How does it come? Wrong PPA enabled or the repository entry not updated after distribution upgrade?

thopiekar avatar Jul 23 '16 17:07 thopiekar

@thopiekar In my case, the apt-get uses python 3.4, which links to /usr/lib/python3 (used by the OS), but for my projects I use python 3.5, that links to /usr/local/lib/python3.5. Anyway, even if I launch an app with py 3.4, it still fails.

The py 3.5 works, but I see these warnings upon an app start: link

jligeza avatar Jul 23 '16 20:07 jligeza

Because you mixed up binary modules which were built for Python 3.4 with Python 3.5. Our PPA isn't meant to be used with custom installations. If you want to use deb packages always be sure you also use the Ubuntu repositories to install all your needs. If there is Python 3.5 missing for you, you should think about upgrading to Ubuntu Xenial.

Therefore...

thopiekar avatar Jul 23 '16 23:07 thopiekar

Is there something I can follow to fix this issue? I am having the same problem . No module named kivy_clock

flyyn avatar Dec 29 '16 14:12 flyyn

Recently I had also problems to update/install kivy on one of my windows machines (my main Ubuntu machine is still fine).

The fix for me was to use the nightly wheel installation files like described here: https://kivy.org/docs/installation/installation-windows.html#nightly-wheel-installation. This removed my old/broken kivy version 1.9.1 installation and replaced it with the version 1.9.2 which now works for my old kivy apps as well as for my new one.

HTH

2016-12-29 14:07 GMT+00:00 Luis yuri meshi [email protected]:

Is there something I can follow to fix this issue? I am having the same problem . No module named kivy_clock

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kivy/kivy/issues/4428#issuecomment-269634710, or mute the thread https://github.com/notifications/unsubscribe-auth/ADlPbnRoscz8Hp6Kr9TwR5GO9tuWI9m6ks5rM76hgaJpZM4I-Gw- .

AndiEcker avatar Dec 29 '16 14:12 AndiEcker

Thanks for the quick response. Does this apply to installing it on the raspberry PI as well?

Thanks.

Sent from my iPhone

On Dec 29, 2016, at 9:58 AM, Andreas Ecker <zu @github.com> wrote:

Recently I had also problems to update/install kivy on one of my windows machines (my main Ubuntu machine is still fine).

The fix for me was to use the nightly wheel installation files like described here: https://kivy.org/docs/installation/installation-windows.html#nightly-wheel-installation. This removed my old/broken kivy version 1.9.1 installation and replaced it with the version 1.9.2 which now works for my old kivy apps as well as for my new one.

HTH

2016-12-29 14:07 GMT+00:00 Luis yuri meshi [email protected]:

Is there something I can follow to fix this issue? I am having the same problem . No module named kivy_clock

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kivy/kivy/issues/4428#issuecomment-269634710, or mute the thread https://github.com/notifications/unsubscribe-auth/ADlPbnRoscz8Hp6Kr9TwR5GO9tuWI9m6ks5rM76hgaJpZM4I-Gw- .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

flyyn avatar Dec 29 '16 17:12 flyyn

Sorry but just noticed that the nightly wheels packages are only available for Windows :/.

Assuming you already tried the instructions on https://kivy.org/docs/installation/installation-rpi.html.

The missing kivy._clock error is possibly coming from a wrong version of cython installed on your RPI. Did you tried to revert to an older version of cython by specifying cython==0.20.1 in your buildozer requirements? Additionally you should probably also use the stable kivy release 1.9.1 (instead of the Kivy Master branch as the main tutorial suggests) - more info in this post: https://groups.google.com/forum/#!topic/kivy-users/OSpnIv4a_S4

2016-12-29 17:54 GMT+00:00 Luis yuri meshi [email protected]:

Thanks for the quick response. Does this apply to installing it on the raspberry PI as well?

Thanks.

Sent from my iPhone

On Dec 29, 2016, at 9:58 AM, Andreas Ecker <zu @github.com> wrote:

Recently I had also problems to update/install kivy on one of my windows machines (my main Ubuntu machine is still fine).

The fix for me was to use the nightly wheel installation files like described here: https://kivy.org/docs/installation/installation- windows.html#nightly-wheel-installation. This removed my old/broken kivy version 1.9.1 installation and replaced it with the version 1.9.2 which now works for my old kivy apps as well as for my new one.

HTH

2016-12-29 14:07 GMT+00:00 Luis yuri meshi [email protected]:

Is there something I can follow to fix this issue? I am having the same problem . No module named kivy_clock

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kivy/kivy/issues/4428#issuecomment-269634710, or mute the thread <https://github.com/notifications/unsubscribe-auth/ ADlPbnRoscz8Hp6Kr9TwR5GO9tuWI9m6ks5rM76hgaJpZM4I-Gw-> .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kivy/kivy/issues/4428#issuecomment-269667446, or mute the thread https://github.com/notifications/unsubscribe-auth/ADlPbicFUHPHvJhj9AqnGiLyBgaMFiUCks5rM_PygaJpZM4I-Gw- .

AndiEcker avatar Dec 30 '16 09:12 AndiEcker

It's ok . I tried this before and I got it to work once but after I rebooted my pi and got stuck in the log in screen . I am going to try this method again. Thanks .

Sent from my iPhone

On Dec 30, 2016, at 4:35 AM, Andreas Ecker [email protected] wrote:

Sorry but just noticed that the nightly wheels packages are only available for Windows :/.

Assuming you already tried the instructions on https://kivy.org/docs/installation/installation-rpi.html.

The missing kivy._clock error is possibly coming from a wrong version of cython installed on your RPI. Did you tried to revert to an older version of cython by specifying cython==0.20.1 in your buildozer requirements? Additionally you should probably also use the stable kivy release 1.9.1 (instead of the Kivy Master branch as the main tutorial suggests) - more info in this post: https://groups.google.com/forum/#!topic/kivy-users/OSpnIv4a_S4

2016-12-29 17:54 GMT+00:00 Luis yuri meshi [email protected]:

Thanks for the quick response. Does this apply to installing it on the raspberry PI as well?

Thanks.

Sent from my iPhone

On Dec 29, 2016, at 9:58 AM, Andreas Ecker <zu @github.com> wrote:

Recently I had also problems to update/install kivy on one of my windows machines (my main Ubuntu machine is still fine).

The fix for me was to use the nightly wheel installation files like described here: https://kivy.org/docs/installation/installation- windows.html#nightly-wheel-installation. This removed my old/broken kivy version 1.9.1 installation and replaced it with the version 1.9.2 which now works for my old kivy apps as well as for my new one.

HTH

2016-12-29 14:07 GMT+00:00 Luis yuri meshi [email protected]:

Is there something I can follow to fix this issue? I am having the same problem . No module named kivy_clock

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kivy/kivy/issues/4428#issuecomment-269634710, or mute the thread <https://github.com/notifications/unsubscribe-auth/ ADlPbnRoscz8Hp6Kr9TwR5GO9tuWI9m6ks5rM76hgaJpZM4I-Gw-> .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kivy/kivy/issues/4428#issuecomment-269667446, or mute the thread https://github.com/notifications/unsubscribe-auth/ADlPbicFUHPHvJhj9AqnGiLyBgaMFiUCks5rM_PygaJpZM4I-Gw- .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

flyyn avatar Dec 30 '16 13:12 flyyn

hi, i have this problem too!

python version: 3.6.3 os: ubuntu gnome 16.04 LTS kivy version: 1.10.0 kivy installation method: ppa:kivy-team/kivy sudo apt install python3-kivy

[INFO   ] Logger: Record log in /home/saeed/.kivy/logs/kivy_17-10-27_37.txt
[INFO   ] Kivy: v1.10.0
[INFO   ] Python: v3.6.3 (default, Oct  6 2017, 08:44:35) 
[GCC 5.4.0 20160609]
[WARNING] stderr: Traceback (most recent call last):
[WARNING] stderr:   File "/home/saeed/PycharmProjects/second_project/main.py", line 4, in <module>
[WARNING] stderr:     from kivy.app import App
[WARNING] stderr:   File "/usr/lib/python3/dist-packages/kivy/app.py", line 319, in <module>
[WARNING] stderr:     from kivy.base import runTouchApp, stopTouchApp
[WARNING] stderr:   File "/usr/lib/python3/dist-packages/kivy/base.py", line 29, in <module>
[WARNING] stderr:     from kivy.clock import Clock
[WARNING] stderr:   File "/usr/lib/python3/dist-packages/kivy/clock.py", line 362, in <module>
[WARNING] stderr:     from kivy._clock import CyClockBase, ClockEvent, FreeClockEvent, \
[WARNING] stderr: ModuleNotFoundError: No module named 'kivy._clock'
[WARNING] stderr: Error in sys.excepthook:
[WARNING] stderr: Traceback (most recent call last):
[WARNING] stderr:   File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
[WARNING] stderr:     from apport.fileutils import likely_packaged, get_recent_crashes
[WARNING] stderr:   File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
[WARNING] stderr:     from apport.report import Report
[WARNING] stderr:   File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
[WARNING] stderr:     import apport.fileutils
[WARNING] stderr:   File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
[WARNING] stderr:     from apport.packaging_impl import impl as packaging
[WARNING] stderr:   File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
[WARNING] stderr:     import apt
[WARNING] stderr:   File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
[WARNING] stderr:     import apt_pkg
[WARNING] stderr: ModuleNotFoundError: No module named 'apt_pkg'
[WARNING] stderr: 
[WARNING] stderr: Original exception was:
[WARNING] stderr: Traceback (most recent call last):
[WARNING] stderr:   File "/home/saeed/PycharmProjects/second_project/main.py", line 4, in <module>
[WARNING] stderr:     from kivy.app import App
[WARNING] stderr:   File "/usr/lib/python3/dist-packages/kivy/app.py", line 319, in <module>
[WARNING] stderr:     from kivy.base import runTouchApp, stopTouchApp
[WARNING] stderr:   File "/usr/lib/python3/dist-packages/kivy/base.py", line 29, in <module>
[WARNING] stderr:     from kivy.clock import Clock
[WARNING] stderr:   File "/usr/lib/python3/dist-packages/kivy/clock.py", line 362, in <module>
[WARNING] stderr:     from kivy._clock import CyClockBase, ClockEvent, FreeClockEvent, \
[WARNING] stderr: ModuleNotFoundError: No module named 'kivy._clock'

any advice?

SaeedDev94 avatar Oct 27 '17 07:10 SaeedDev94

I have the same problem on ubuntu 18.04, python 3.6.5

mj-01 avatar May 19 '18 17:05 mj-01