当我尝试使用python中的twisted时,它无法加载。额外路径不在我的sys.path中。即使我将它添加到sys.path也无法加载扭曲。有什么想法吗?
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
答案 0 :(得分:1)
您确定所有权限设置正确吗?如果您手动安装它可能是权限问题。检查文件的权限是644,目录的权限是755。