Announcement Announcement Module
No announcement yet.
Trouble using pyro4 Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Trouble using pyro4

    Hi, I am a total newbie to spring python so I appreciate any help you can give me.
    I am getting an error that says No module named Pyro.core from springpython

    File "C:\Python26\lib\site-packages\springpython-1.3.0.rc1-py2.6.egg\springpython\factory\", line 37, in create_object
    File "C:\Python26\lib\site-packages\springpython-1.3.0.rc1-py2.6.egg\springpython\remoting\pyro\", line 17, in <module>
    import Pyro.core
    ImportError: No module named Pyro.core

    not sure why this is happening?
    I am basically running the sample code on
    Last edited by js1234556; Feb 17th, 2012, 02:37 PM. Reason: added a link

  • #2
    Have you installed Pyro yet? There is Pyro and Pyro4, which are two different versions (the previous being Pyro 3). If you are using virtualenv, then you have access to pip, and can type "pip install Pyro". Or, "pip install Pyro4" and use Pyro4ServiceExporter and Pyro4ProxyFactory.

    For more details about Pyro itself, see and


    • #3
      Greg, thank you for you response.
      I have installed Pyro4 and I am able to use it directly and run code that accesses remote objects.

      I am having trouble getting springpython to call Pyro4. see code below. I also tried changing to
      class="springpython.remoting.Pyro4.Pyro4ServiceExp orter" with the same import problems.

      I am using the following code to try and create a remote service:
      <?xml version="1.0" encoding="UTF-8"?>
      <objects xmlns=""

      <object id="remoteService" class="server.Service"/>

      <object id="service_exporter" class="springpython.remoting.pyro.PyroServiceExpor ter">
      <property name="service_name" value="ServiceName"/>
      <property name="service" ref="remoteService"/>
      <property name="service_host" value=""/>
      <property name="service_port" value="7000"/>


      And in the following code in (

      from springpython.config import XMLConfig
      from springpython.context import ApplicationContext

      class Service(object):
      def get_data(self, param):
      return "You got remote data => %s" % param

      if __name__ == "__main__":
      appContext = ApplicationContext(XMLConfig("server.xml"))