2012-12-08 16 views
0

当我尝试从python使用扭曲它无法加载。额外路径不在我的sys.path中。即使当我将它添加到sys.path中时,它也无法加载扭曲。有任何想法吗?扭曲安装在mac os x但不能导入

sudo find/-name twisted 
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted 
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted 

Python 2.6.6 (r266:84374, Aug 31 2010, 11:00:51) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin 
Type "help", "copyright", "credits" or "license" for more information. 
>>> from twisted.internet.protocol import Factory 
Traceback (most recent call last): 
    File "test.py", line 1, in <module> 
    from twisted.internet.protocol import Factory 
ImportError: No module named twisted.internet.protocol 

回答

1

您确定所有权限设置正确吗?如果您手动安装它,则可能是权限问题。检查文件的权限为644,目录的权限为755。

+0

我的python安装有些奇怪我认为,因为easy_install指向2.7,但python是2.6.6 –