[Sugar-devel] Contribution to SUGARLABS

James Cameron quozl at laptop.org
Wed Jan 22 23:16:07 EST 2020


Sorry, I don't remember.

You should really figure this out yourself, as it is a question for
Ubuntu or GTK communities, not Sugar.

However, to get you moving;

1.  what is failing for you is `python2 -c "import gtk"`,

2.  on an Ubuntu 18.04 VM in my lab, the above command works, but
there is no list of which packages were used,

3.  using strace and dpkg to list the packages used;

```
guest at guest:~$ DISPLAY=:0 strace -o tmp -e openat python2 -c 'import gtk'
guest at guest:~$ dpkg -S $(grep gtk tmp|grep -v ENOENT|cut -f2 -d'"'|sort|uniq) 2>/dev/null|cut -f1 -d:|sort|uniq
language-pack-gnome-en-base
libgtk2.0-0
python-gobject-2
python-gtk2
```

Tracing the dependencies between each package suggests python-gtk2 is
the package to install.  I've not tested this.

What package did you try to install?  What happened when you tried?

Please, don't call me Sir.

On Thu, Jan 23, 2020 at 09:29:27AM +0530, Abhishek Tanwar wrote:
> Hello,
> 
> Sir I tried installing GTK+2 but it seems it didn't get installed . I am using
> Ubuntu 18.04 on my VM.
> It would be great if you could help me with the installation of GTK+2 (command
> or the source from where I can install it with steps).
> 
> Thank You
> 
> On Thu, Jan 23, 2020 at 8:51 AM James Cameron <[1]quozl at laptop.org> wrote:
> 
>     You haven't got GTK 2 installed yet, on your VM.  I can't be specific
>     about how to install it, because I don't know what operating system
>     you are using in the VM.
> 
>     Immediately after that, you will also face
>     [2]https://github.com/sugarlabs/arithmetic/issues/3
> 
>     On Thu, Jan 23, 2020 at 04:26:48AM +0530, Abhishek Tanwar wrote:
>     > I am trying to port the Arithmetic activity to GTK+3 . I downloaded the
>     > repository and ran it (GTK version) so that I can see the interface and
>     make
>     > the same using GTK+3 but it doesnt work.
>     > Here are the logs when I run this activity on my sugar desktop on my VM.
>     > I am not able to understand the errors,if anyone could show me the
>     direction
>     > .It would be much appreciated.
>     >
>     > Thank You
>     >
>     > <type 'exceptions.ImportError'>
>     > Python 2.7.17: /usr/bin/python
>     > Thu Jan 23 04:13:18 2020
>     >
>     > A problem occurred in a Python script.  Here is the sequence of
>     > function calls leading up to the error, in the order they occurred.
>     >
>     >  /usr/bin/sugar-activity in <module>()
>     >   215
>     >   216     if hasattr(instance, 'run_main_loop'):
>     >   217         instance.run_main_loop()
>     >   218
>     >   219 main()
>     > main = <function main>
>     >
>     >  /usr/bin/sugar-activity in main()
>     >   161     class_name = splitted_module[1]
>     >   162
>     >   163     module = __import__(module_name)
>     >   164     for comp in module_name.split('.')[1:]:
>     >   165         module = getattr(module, comp)
>     > module undefined
>     > builtin__import__ = <built-in function __import__>
>     > module_name = 'arithmetic'
>     >
>     >  /usr/share/sugar/activities/Arithmetic.activity/arithmetic.py in
>     <module>()
>     >    15
>     >    16 import logging
>     >    17 import gtk
>     >    18 import pango
>     >    19 import random
>     > gtk undefined
>     > <type 'exceptions.ImportError'>: No module named gtk
>     >     __class__ = <type 'exceptions.ImportError'>
>     >     __delattr__ = <method-wrapper '__delattr__' of exceptions.ImportError
>     > object>
>     >     __dict__ = {}
>     >     __doc__ = "Import can't find module, or can't find name in module."
>     >     __format__ = <built-in method __format__ of exceptions.ImportError
>     object>
>     >     __getattribute__ = <method-wrapper '__getattribute__' of
>     > exceptions.ImportError object>
>     >     __getitem__ = <method-wrapper '__getitem__' of exceptions.ImportError
>     > object>
>     >     __getslice__ = <method-wrapper '__getslice__' of
>     exceptions.ImportError
>     > object>
>     >     __hash__ = <method-wrapper '__hash__' of exceptions.ImportError
>     object>
>     >     __init__ = <method-wrapper '__init__' of exceptions.ImportError
>     object>
>     >     __new__ = <built-in method __new__ of type object>
>     >     __reduce__ = <built-in method __reduce__ of exceptions.ImportError
>     object>
>     >     __reduce_ex__ = <built-in method __reduce_ex__ of
>     exceptions.ImportError
>     > object>
>     >     __repr__ = <method-wrapper '__repr__' of exceptions.ImportError
>     object>
>     >     __setattr__ = <method-wrapper '__setattr__' of exceptions.ImportError
>     > object>
>     >     __setstate__ = <built-in method __setstate__ of
>     exceptions.ImportError
>     > object>
>     >     __sizeof__ = <built-in method __sizeof__ of exceptions.ImportError
>     object>
>     >     __str__ = <method-wrapper '__str__' of exceptions.ImportError object>
>     >     __subclasshook__ = <built-in method __subclasshook__ of type object>
>     >     __unicode__ = <built-in method __unicode__ of exceptions.ImportError
>     > object>
>     >     args = ('No module named gtk',)
>     >     message = 'No module named gtk'
>     >
>     > The above is a description of an error in a Python program.  Here is
>     > the original traceback:
>     >
>     > Traceback (most recent call last):
>     >   File "/usr/bin/sugar-activity", line 219, in <module>
>     >     main()
>     >   File "/usr/bin/sugar-activity", line 163, in main
>     >     module = __import__(module_name)
>     >   File "/usr/share/sugar/activities/Arithmetic.activity/arithmetic.py",
>     line
>     > 17, in <module>
>     >     import gtk
>     > ImportError: No module named gtk
>     >
>     > Exited with status 1, pid 1675 data (<open file '<fdopen>', mode 'w' at
>     > 0x7f28d7dbc780>, 'e1df43f3e9571a85b2dc8b025ba334c83eff39ea')
>     >
>     > On Tue, Jan 21, 2020 at 6:52 PM Walter Bender <[1][3]
>     walter.bender at gmail.com>
>     > wrote:
>     >
>     >     On Tue, Jan 21, 2020 at 6:15 AM Abhishek Tanwar <[2]
>     >     [4]abhishektanwar184 at gmail.com> wrote:
>     >
>     >         Hello sir
>     >         Thank you for your response and valuable information . I have
>     found these
>     >         [3][5]https://github.com/sugarlabs/arithmetic/issues/4 and
>     >         [4][6]https://github.com/sugarlabs/Bounce
>     >         activities and I feel comfortable with the code and I want to
>     port this
>     >         activity to GTK +3.
>     >
>     >         Is there any certain procedure that I am supposed to follow in
>     order to
>     >         contribute to these two tasks or can I straight away start with
>     it.
>     >
>     >     [5][7]https://github.com/sugarlabs/sugar-docs/blob/master/src/
>     contributing.md
>     >      should have all the information you need.
>     >
>     >     regards.
>     >
>     >     -walter
>     >
>     >         Thank you
>     >
>     >         _______________________________________________
>     >         Sugar-devel mailing list
>     >         [6][8]Sugar-devel at lists.sugarlabs.org
>     >         [7][9]http://lists.sugarlabs.org/listinfo/sugar-devel
>     >
>     >     --
>     >     Walter Bender
>     >     Sugar Labs
>     >     [8][10]http://www.sugarlabs.org
>     >     [9]
>     >
>     > References:
>     >
>     > [1] mailto:[11]walter.bender at gmail.com
>     > [2] mailto:[12]abhishektanwar184 at gmail.com
>     > [3] [13]https://github.com/sugarlabs/arithmetic/issues/4
>     > [4] [14]https://github.com/sugarlabs/Bounce
>     > [5] [15]https://github.com/sugarlabs/sugar-docs/blob/master/src/
>     contributing.md
>     > [6] mailto:[16]Sugar-devel at lists.sugarlabs.org
>     > [7] [17]http://lists.sugarlabs.org/listinfo/sugar-devel
>     > [8] [18]http://www.sugarlabs.org/
>     > [9] [19]http://www.sugarlabs.org/
> 
>     > _______________________________________________
>     > Sugar-devel mailing list
>     > [20]Sugar-devel at lists.sugarlabs.org
>     > [21]http://lists.sugarlabs.org/listinfo/sugar-devel
> 
>     --
>     James Cameron
>     [22]http://quozl.netrek.org/
> 
> References:
> 
> [1] mailto:quozl at laptop.org
> [2] https://github.com/sugarlabs/arithmetic/issues/3
> [3] mailto:walter.bender at gmail.com
> [4] mailto:abhishektanwar184 at gmail.com
> [5] https://github.com/sugarlabs/arithmetic/issues/4
> [6] https://github.com/sugarlabs/Bounce
> [7] https://github.com/sugarlabs/sugar-docs/blob/master/src/contributing.md
> [8] mailto:Sugar-devel at lists.sugarlabs.org
> [9] http://lists.sugarlabs.org/listinfo/sugar-devel
> [10] http://www.sugarlabs.org/
> [11] mailto:walter.bender at gmail.com
> [12] mailto:abhishektanwar184 at gmail.com
> [13] https://github.com/sugarlabs/arithmetic/issues/4
> [14] https://github.com/sugarlabs/Bounce
> [15] https://github.com/sugarlabs/sugar-docs/blob/master/src/contributing.md
> [16] mailto:Sugar-devel at lists.sugarlabs.org
> [17] http://lists.sugarlabs.org/listinfo/sugar-devel
> [18] http://www.sugarlabs.org/
> [19] http://www.sugarlabs.org/
> [20] mailto:Sugar-devel at lists.sugarlabs.org
> [21] http://lists.sugarlabs.org/listinfo/sugar-devel
> [22] http://quozl.netrek.org/

-- 
James Cameron
http://quozl.netrek.org/


More information about the Sugar-devel mailing list