2013-01-16 84 views
0

我試圖將一個python應用程序移植到jython,並遇到jython無法導入kombu(在原始python應用程序中顯着使用)的問題。無法從jython導入kombu

我已經安裝了通過PIP海帶(甚至試圖-U選項來獲得最新版本):

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... 

我已經Jython的版本2.5.3安裝,當我嘗試導入海帶,我得到一個「ImportError:No module named kombu」錯誤:

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 

任何幫助將不勝感激!

感謝, 弗林特

回答

1

從對Jython的IRC鄉親的幫助下,我終於得到了過去的這個錯誤。我的問題是我沒有在Jython中安裝kombu。完成該過程的過程可以在Importing python modules in jython找到。