[Sugar-devel] Problem starting working with browse-activity

James Cameron quozl at laptop.org
Mon Mar 16 02:53:30 EDT 2020


As you want to develop on the Python 3 or master branch of Browse, you
must have Sugar 0.116 installed for Python 3.  You can tell when that
is complete by running "python3 -c 'import sugar3'" without error.

You can do this with Ubuntu 18.04, but not with the user instructions
you referenced.  Those instructions are for using Sugar 0.112 with
Ubuntu, which is the only version Ubuntu have packaged, in turn
because Sugar 0.112 was the version packaged by Debian just prior to
the Ubuntu 18.04 freeze back in early 2018.  You will find that
"python2 -c 'import sugar3'" works without error.

Instead, you should use developer instructions.

https://github.com/sugarlabs/sugar/blob/master/docs/development-environment.md
are the developer instructions we maintain.  There are three sections.
The section "Packaged Sugar" will not work for you with Ubuntu 18.04,
as explained above.  So your choices are either "Sugar Live Build" or
"Native Sugar".

The former involves running another virtual machine.

The latter involves invasive changes to your Ubuntu 18.04 VM.  You're
welcome to follow those instructions, but if you are inexperienced in
any of the tools used there is a risk your VM won't be usable
afterward.

An alternative I've been working on recently is a set of packages to
add to the Ubuntu 20.04 operating system, which is yet to be
released.  The packages are available now, and I test them daily.

See my prior post on "Sugar for Ubuntu 20.04"
http://lists.sugarlabs.org/archive/sugar-devel/2020-February/057763.html

Of the three choices above, I don't know you well enough to suggest
any in particular.  Please review them all.

On Mon, Mar 16, 2020 at 05:25:51PM +0530, Hitesh Shejwani wrote:
> I am not sure how to install sugar 0.116 in Ubuntu 18.04. I installed Sugar
> according to the info given here ([1]https://github.com/sugarlabs/sugar/blob/
> master/docs/ubuntu.md)
> 
> But as you pointed out, it is an older version of Sugar. How do I fix that?
> 
> On Sat, Mar 14, 2020 at 2:36 AM James Cameron <[2]quozl at laptop.org> wrote:
> 
>     The Download button does not do anything until a download begins;
>     you'll see that in the source code.
> 
>     Work with the Python 3 branch by using the master branch, combined
>     with Sugar 0.116.
> 
>     On Fri, Mar 13, 2020 at 05:35:16PM +0530, Hitesh Shejwani wrote:
>     > Thanks for the response James. 
>     >
>     > I saw that when I clicked on the Download button in the browser, it
>     didn't do
>     > anything. So I thought to add something to it. 
>     >
>     > How do I work with the Python 3 branch? 
>     >
>     > On Fri, Mar 13, 2020, 1:00 PM James Cameron <[1][3]quozl at laptop.org>
>     wrote:
>     >
>     >     Welcome Hitesh.
>     >
>     >     urllib.request is a Python 3 module.
>     >
>     >     Browse master branch has been ported to Python 3, and requires Sugar
>     >     0.116, which in turn includes sugar-activity3.  Browse file
>     >     activity/[2][4]activity.info specifies sugar-activity3.
>     >
>     >     If you wish to use the Python 2 version of Browse, use the branch
>     >     python2.
>     >
>     >     Work on Browse is best done on the master branch unless you have a
>     >     good reason to work on Python 2.  I don't know why you are trying to
>     >     work on Browse, so I can't deduce your needs.
>     >
>     >     On Fri, Mar 13, 2020 at 12:40:09PM +0530, Hitesh Shejwani wrote:
>     >     > Hello,
>     >     >
>     >     > I am trying to work on the browse-activity. I cloned the repo on my
>     VM
>     >     and
>     >     > installed sugar for Ubuntu. When I try to start the activity with
>     >     > sugar-activity browser.py, it throws an error with traceback
>     >     >
>     >     > import urllib.request
>     >     > ImportError: No module named request
>     >     >
>     >     > I am using Ubuntu 18.04. I tried using sugar-activity3 but it was
>     not
>     >     found.
>     >
>     >     > _______________________________________________
>     >     > Sugar-devel mailing list
>     >     > [3][5]Sugar-devel at lists.sugarlabs.org
>     >     > [4][6]http://lists.sugarlabs.org/listinfo/sugar-devel
>     >
>     >     --
>     >     James Cameron
>     >     [5][7]http://quozl.netrek.org/
>     >
>     > References:
>     >
>     > [1] mailto:[8]quozl at laptop.org
>     > [2] [9]http://activity.info/
>     > [3] mailto:[10]Sugar-devel at lists.sugarlabs.org
>     > [4] [11]http://lists.sugarlabs.org/listinfo/sugar-devel
>     > [5] [12]http://quozl.netrek.org/
> 
>     --
>     James Cameron
>     [13]http://quozl.netrek.org/
> 
> References:
> 
> [1] https://github.com/sugarlabs/sugar/blob/master/docs/ubuntu.md
> [2] mailto:quozl at laptop.org
> [3] mailto:quozl at laptop.org
> [4] http://activity.info/
> [5] mailto:Sugar-devel at lists.sugarlabs.org
> [6] http://lists.sugarlabs.org/listinfo/sugar-devel
> [7] http://quozl.netrek.org/
> [8] mailto:quozl at laptop.org
> [9] http://activity.info/
> [10] mailto:Sugar-devel at lists.sugarlabs.org
> [11] http://lists.sugarlabs.org/listinfo/sugar-devel
> [12] http://quozl.netrek.org/
> [13] http://quozl.netrek.org/

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


More information about the Sugar-devel mailing list