Re: Cannot import kombu from jython

Skip to first unread message

Ask Solem

Jan 23, 2013, 6:12:13 AM1/23/13

On Wednesday, January 16, 2013 8:40:31 PM UTC, wrote:

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 egg_info for package kombu

Downloading/unpacking anyjson>=0.3.3 (from kombu)
  Downloading anyjson-0.3.3.tar.gz
  Running 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 egg_info for package amqp

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

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

  Found existing installation: kombu 2.5.4
    Uninstalling kombu:
      Successfully uninstalled kombu
  Running 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

Are you sure kombu is on sys.path?

If so could you try to run:

python -v -c 'import kombu'
Reply all
Reply to author
0 new messages