确定python module的路径 baidu之后,方法有二 import imp imp.find_module('redis') import redis print redis.__file__ 注意对于有些模块,可能这个是不能用的