2

i have installed pyjamas on debian

http://pyjs.org/getting_started.html

however my program does not find the module, what could be the problem, i have installed pyjamas correctly using apt-get

krisdigitx-virtual-machine ~ # python jamas.py 
Traceback (most recent call last):
  File "jamas.py", line 3, in <module>
    from pyjamas import Window
ImportError: No module named pyjamas
krisdigitx-virtual-machine ~ # 


#!/usr/bin/env python

from pyjs import Window
from pyjs.ui import RootPanel, Button
from pyjs.ui import HTML


def greet(sender):
    Window.alert("Hello Krishna!")

b = Button("click me", greet)
Rootpanel().add(b)

After some research:

i had to do pyjsbuild jamas.py to get the output directory, however it gives me a new error

jamas TypeError: jamas.RootPanel().add is not a function
krisdigitx
  • 7,068
  • 20
  • 61
  • 97
  • What you have put there is clearly not the correct code (`Rootpanel` is not `RootPanel`). The `pyjs` vs. `pyjamas` doesn't match either. Could you please just paste what you've got to make sure that you've got it right. – Chris Morgan Aug 07 '11 at 23:57
  • i corrected that and now it gives this error jamas TypeError: jamas.RootPanel().add is not a function – krisdigitx Aug 08 '11 at 19:51

2 Answers2

1

Since you get an

ImportError: No module named pyjamas

you may need to add the module's path to $PYTHONPATH with

export PYTHONPATH=$PYTHONPATH:/usr/share/pyjamas/library
Garrett Hyde
  • 5,409
  • 8
  • 49
  • 55
Papado
  • 93
  • 1
  • 1
  • 4
1
  1. Please go to http://pyjs.org/GettingHelp.html
  2. The first link "Getting Started" is a detailled walkthrough for an installation to start from scratch. Basically, what it says there is: Get the up-to-date source code from the git repository.

All steps to get Pyjs and Pyjs Desktop running are described in the Wiki article in the necessary detail, but still concise enough.

Peterino
  • 15,097
  • 3
  • 28
  • 29