0

I'm trying to port a python application to jython and have run into a problem where jython cannot import kombu (which is used prominently in the original python app).

I have installed kombu via pip (and even tried the -U option to get the most recent version):

sudo pip install -U kombu
Downloading/unpacking kombu
  Downloading kombu-2.5.4.tar.gz (300Kb): 300Kb downloaded
  Running setup.py egg_info for package kombu

Downloading/unpacking anyjson>=0.3.3 (from kombu)
  Downloading anyjson-0.3.3.tar.gz
  Running setup.py egg_info for package anyjson

Downloading/unpacking amqp>=1.0.5,<1.1.0 (from kombu)
  Downloading amqp-1.0.6.tar.gz (69Kb): 69Kb downloaded
  Running setup.py egg_info for package amqp

Installing collected packages: amqp, anyjson, kombu
  Found existing installation: amqp 1.0.6
    Uninstalling amqp:
      Successfully uninstalled amqp
  Running setup.py install for amqp

  Found existing installation: anyjson 0.3.3
    Uninstalling anyjson:
      Successfully uninstalled anyjson
  Running setup.py install for anyjson

  Found existing installation: kombu 2.5.4
    Uninstalling kombu:
      Successfully uninstalled kombu
  Running setup.py install for kombu

Successfully installed amqp anyjson kombu
Cleaning up...

I have jython version 2.5.3 installed and when I try to import kombu, I get an "ImportError: No module named kombu" error:

Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:48:36) 
[Java HotSpot(TM) 64-Bit Server VM (Sun Microsystems Inc.)] on java1.6.0_26
Type "help", "copyright", "credits" or "license" for more information.
>>> import kombu
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named kombu
>>> from kombu.connection import BrokerConnection
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named kombu

Any help would be greatly appreciated!

Thanks, Flint

Flint
  • 11
  • 1

1 Answers1

1

With help from the folks on the Jython IRC, I finally got past this error. My problem was that I wasn't installing kombu within Jython. The process to accomplish that can be found at Importing python modules in jython.

Community
  • 1
  • 1
Flint
  • 11
  • 1