4
我想为scientific analysis使用Orange包。安装在x86_64 Ubuntu 12.04
上,使用Python 2.7.3
,运行良好,使用sudo easy_install orange
。但是,包似乎没有可供直接使用:导入橙色返回“ImportError:no module named orange”
11:30:43 [email protected]:~$ python
Python 2.7.3 (default, Apr 20 2012, 22:39:59)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import orange
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named orange
>>>
然而,导入包,而从适当的dist-包子目录下的Python的正常工作:
11:34:02 [email protected]:~$ cd /usr/local/lib/python2.7/dist-packages/Orange-2.5a4-py2.7-linux-x86_64.egg/Orange
11:34:32 [email protected]:/usr/local/lib/python2.7/dist-packages/Orange-2.5a4-py2.7-linux-x86_64.egg/Orange$ python
Python 2.7.3 (default, Apr 20 2012, 22:39:59)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import orange
>>> orange.__file__
'orange.so'
>>>
什么问题?当Python从文件系统中的任何位置调用时,dist-packages中包含的其他软件包可以正常工作。