installing and running codenode

198 views
Skip to first unread message

Ralf Hemmecke

unread,
Apr 22, 2012, 11:21:18 AM4/22/12
to codenod...@googlegroups.com
Hello,

I've problems to get codenode working when I follow
http://codenode.org/docs/install.html#install

Recommended install:
====================

fricas-codenode>D=$HOME/fricas-codenode-install
fricas-codenode>mkdir -p $D
fricas-codenode>cd $D
fricas-codenode-install>git clone git://github.com/pypa/virtualenv.git
Cloning into virtualenv...
remote: Counting objects: 2504, done.
remote: Compressing objects: 100% (866/866), done.
remote: Total 2504 (delta 1626), reused 2504 (delta 1626)
Receiving objects: 100% (2504/2504), 13.03 MiB, done.
Resolving deltas: 100% (1626/1626), done.
fricas-codenode-install>cd virtualenv
fricas-codenode-install/virtualenv>git checkout master
fricas-codenode-install/virtualenv>python virtualenv.py $D
New python executable in /home/hemmecke/fricas-codenode-install/bin/python
Installing setuptools............done.
Installing pip...............done.
(fricas-codenode-install)deb:~/fricas-codenode-install/virtualenv>cd $D
fricas-codenode-install>source $D/bin/activate # activate virtualenv
(fricas-codenode-install)fricas-codenode-install>$D/virtualenv/virtualenv.py
--no-site-packages $D/mycodenode
The --no-site-packages flag is deprecated; it is now the default behavior.
Using real prefix '/usr'
New python executable in
/home/hemmecke/fricas-codenode-install/mycodenode/bin/python
Installing setuptools............done.
Installing pip...............done.
(fricas-codenode-install)fricas-codenode-install>pip install codenode
Downloading/unpacking codenode
Cannot fetch index base URL http://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement codenode
No distributions at all found for codenode
Storing complete log in /home/hemmecke/.pip/pip.log
(fricas-codenode-install)deb:~/fricas-codenode-install>


Advanced Install:
=================

If I use in the last step

pip install -e git://github.com/codenode/codenode.git#egg=codenode
(pip complains about the -E flag, so I removed it)

then I get (see attached install.log).

That seemed to work but I was a bit worried about the lines

============
Running setup.py egg_info for package codenode

Installed
/home/hemmecke/fricas-codenode-install/src/codenode/nose-1.1.2-py2.6.egg
package init file 'codenode/twisted/plugins/__init__.py' not found
(or not a regular file)
warning: no files found matching
'codenode/twisted/plugins/codenode_plugin.py'
=============

Anyway, then I ran

codenode-admin init -name rhxcodenode
cd $D/rhxcodenode
codenode-admin run
browser http://localhost:8000

The log on the command line ended in:

===============
012-04-22 08:09:05-0700 [-] [backend] 2012-04-22 08:09:05-0700 [-]
Starting factory <twisted.web.server.Site instance at 0x200db00>
2012-04-22 08:10:42-0700 [HTTPChannel,0,127.0.0.1]
/home/hemmecke/fricas-codenode-install/src/codenode/codenode/frontend/registration/models.py:4:
exceptions.DeprecationWarning: the sha module is deprecated; use the
hashlib module instead
2012-04-22 08:10:42-0700 [HTTPChannel,0,127.0.0.1]
/home/hemmecke/fricas-codenode-install/lib/python2.6/site-packages/django/views/generic/simple.py:8:
exceptions.DeprecationWarning: Function-based generic views have been
deprecated; use class-based views instead.
===============

and the traceback shown on the website is attached as start.log.

I know that codenode is silent for quiet some time, but is it possible
to get it at least into a state where it works? Do I have to require
some particular versions of django or whatever?

Any hint to make codenode running is very very welcome.

Ralf

install.log
start.log

James Casbon

unread,
Apr 23, 2012, 4:44:47 AM4/23/12
to codenod...@googlegroups.com
Hi Ralf, 

This is definitely a Django issue.  It's been a good few years since codenode was developed.

Your choices are mainly: 
1. find out the version of Django that was current when the last version of codenode was released.
2. try and work through the django changes log and fix any errors.

Apologies, I should probably add a deprecation warning or similar!

Ralf Hemmecke

unread,
Apr 23, 2012, 5:51:49 AM4/23/12
to codenod...@googlegroups.com
Hello James,

> This is definitely a Django issue. It's been a good few years since
> codenode was developed.

OK. As I suspected. Can you confirm that
https://github.com/jamescasbon/codenode/commit/f6402cc5a6405cd906e2c2751a970f3a644a9c30
or
https://github.com/codenode/codenode/commit/89e724a9ce330ea0d040685e3ce2fa6cf539f42f
really is supposed to work (with some version of django)?

> Your choices are mainly:
> 1. find out the version of Django that was current when the last version
> of codenode was released.
> 2. try and work through the django changes log and fix any errors.

Well, it would be of some help if someone could tell me how exactly I
could replace the django that get's installed during "pip install
codenode" by django from https://github.com/django/django. Running "git
bisect" on the django code, I would be quicker to find out which commit
broke codenode.

Any hints?

Ralf

James Casbon

unread,
Apr 23, 2012, 6:10:15 AM4/23/12
to codenod...@googlegroups.com
Hi Ralf, 

Just out of interest, what sparked your interest in codenode?

On 23 April 2012 10:51, Ralf Hemmecke <hemm...@gmail.com> wrote:
Hello James,


This is definitely a Django issue.  It's been a good few years since
codenode was developed.

OK. As I suspected. Can you confirm that
https://github.com/jamescasbon/codenode/commit/f6402cc5a6405cd906e2c2751a970f3a644a9c30
or
https://github.com/codenode/codenode/commit/89e724a9ce330ea0d040685e3ce2fa6cf539f42f
really is supposed to work (with some version of django)?

Hmm, you could delete the V8 engine completely, since you don't need it (unless you wan't javascript).  It may well be that it is causing a problem.

 


Your choices are mainly:
1. find out the version of Django that was current when the last version
of codenode was released.
2. try and work through the django changes log and fix any errors.

Well, it would be of some help if someone could tell me how exactly I could replace the django that get's installed during "pip install codenode" by django from https://github.com/django/django. Running "git bisect" on the django code, I would be quicker to find out which commit broke codenode.

Let me check this later, when I get home.  I think you can try pip install Django==1.x 
The twisted version may also matter.

I found a v old codenode install and tried pip freeze:

jango==1.2.1
Jinja2==2.5
Pygments==1.3.1
Sphinx==1.0b2
Twisted==10.1.0
Whoosh==0.3.18
-e git...@github.com:codenode/codenode.git@89e724a9ce330ea0d040685e3ce2fa6cf539f42f#egg=codenode-v0.03
django-compress==1.0.1
django-extensions==0.5
django-nose==0.1
docutils==0.7
matplotlib==1.0.0
nose==0.11.4
numpy==1.4.1
simplejson==2.1.1
wsgiref==0.1.2
zope.interface==3.6.1

 
--
James
http://casbon.me/

Ralf Hemmecke

unread,
Apr 23, 2012, 6:56:13 AM4/23/12
to codenod...@googlegroups.com
> Just out of interest, what sparked your interest in codenode?

I want a simple frontend for FriCAS. Currently, I'm not necessarily
interested in running FriCAS over the web, but if that works as well,
then the better.

FriCAs currently just has a simple text-based command-line interface and
an interface that works inside emacs. A notebook interface where one
could save the session sounds appealing to me.

As you might have seen, I've tried sagenb, but sagenb still needs some
code from sage, in order to even start. I couuldn't get it working.

Codenode (though not an active project at the moment) seems to be enough
for my purpose.

Thank you for your hints so far. Since I am not so familiar with python
and pip and web programming, I'll have to figure out how exactly I
install codenode with the respectively fixed versions of django,
twisted, etc.

Anyway, since finally, I'll probably have to make codenode work together
with fricas, it certainly makes sense to get everything working from
just a little install script that lives in a local git clone.

Ralf

James Casbon

unread,
Apr 23, 2012, 12:12:35 PM4/23/12
to codenod...@googlegroups.com
On 23 April 2012 11:56, Ralf Hemmecke <hemm...@gmail.com> wrote:
Just out of interest, what sparked your interest in codenode?

I want a simple frontend for FriCAS. Currently, I'm not necessarily interested in running FriCAS over the web, but if that works as well, then the better.

FriCAs currently just has a simple text-based command-line interface and an interface that works inside emacs. A notebook interface where one could save the session sounds appealing to me.

Aha, thanks.

Can you get the graphics from the command line interface too?  Can it print mathml or latex style output?  Is there an embedding API?   This will be the key to using it with codenode.

You might also try the ipython notebook, which is more actively maintained at the moment.  Also I have been working on a JS thingy http://notebookjs.me/ but it doesn't have anything except JS at the minute.

Ralf Hemmecke

unread,
Apr 23, 2012, 12:31:03 PM4/23/12
to codenod...@googlegroups.com
> Can you get the graphics from the command line interface too?

Yes, but the output is via X. In fact, some person developed a graphics
framework that produces svg. I haven't looked into that, but anyway, if
I can get codenode working and connected to fricas, the rest is a
question of gradual improvements.

> Can it print mathml or latex style output?

Yes. I cannot show it directly to you since the Axiom-Wiki is currently
down and I will not invest time before May to bring it back.

> Is there an embedding API? This will be the key to using it with
> codenode.

What exactly does that mean? All I want is the following:
A string is entered into codenode. That string is sent as is to the
fricas command line. FriCAS produces some output, which is displayed as
is. That would be the simplest case and already something that would
make me happy.

FriCAS allows to put in some markers into the output so that recognizing
the prompt etc. would be easy. But that's for later.

> You might also try the ipython notebook, which is more actively
> maintained at the moment.

Thanks. I'll take a look. But note that I don't actually care much about
python. It's the "running in a browser" and moving around the cells etc.
which makes me looking into a notebook format.

> Also I have been working on a JS thingy http://notebookjs.me/ but it
> doesn't have anything except JS at the minute.

Sound's also interesting.
I've also seen codenode-ng on your github account. What's that?

Ralf

Reply all
Reply to author
Forward
0 new messages