簡體   English   中英

扭曲安裝在Mac OS X上但未導入

[英]twisted installed on mac os x but not importing

當我嘗試使用python的twisted時,無法加載。 Extras路徑不在我的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

您確定所有權限設置都正確嗎? 如果您手動安裝它,則可能是權限問題。 檢查文件的權限為644,目錄的權限為755。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM