我在Python中查找安装的库时遇到了问题,因为我在计算机集群中运行它。计算机集群中的python库
当我尝试,例如,在脚本加载numpy的:
#file: /home/foo/test.py
import numpy
print numpy.__version__
在服务器上,我得到这个:
[email protected]:~$ python test.py
1.4.1
但是当我尝试运行在一个节点相同与远程shell,我得到一个错误:
[email protected]:~$ rsh -l foo ab01 "python test.py"
Traceback (most recent call last):
File "test.py", line 2, in <module>
import numpy
ImportError: No module named numpy
有没有办法告诉Python加载安装在CE的文件集群的中央节点?
看看[find_module](http://docs.python.org/library/imp.html#imp.find_module),它可能会帮助你。 – brc