0
我的MacPorts通过安装Scapy的这里推荐官方Scapy的文档中:http://www.secdev.org/projects/scapy/doc/installation.html#mac-os-x错误导入Scapy的插入OSX Python解释器[MacPorts的安装]
当我运行在命令行Scapy的它工作得很好。
但是现在我似乎无法将scapy导入Python解释器或python脚本中,这里是错误。
Python 2.7.3 (default, Jan 31 2013, 22:54:33)
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import scapy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named scapy
我也试过用Python2.5,也不管用。
Python 2.5.6 (r256:88840, Aug 5 2011, 03:29:42)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import scapy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named scapy
我认为它有某种方式与路径的事,但我不知道在哪里可以编辑这些在Mac上,尤其是我的MacPorts从安装Scapy的。
这解决了这个问题,我使用Python的版本在/ opt/local/bin目录/蟒蛇代替。谢谢! – nixor01 2013-02-11 21:30:28