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
我的python安装有些奇怪我认为,因为easy_install指向2.7,但python是2.6.6 –