首页 新闻 搜索 专区 学院

小弟刚学python 不久,在python3 中导入scapy.all 模块报错:找不到指定文件,求助,急急急

0
[已关闭问题] 关闭于 2017-12-13 21:49

我的是python3.6,最近在接触scapy模块,已经安装了scapy-python3,发现可以导入scapy(import scapy),但是导入scapy.all(from scapy.all import *)就出问题,说找不到指定文件

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Mr.zhanglongqi\AppData\Local\Programs\Python\Python36\lib\site-
packages\scapy\all.py", line 16, in <module>
from .arch import *

...

...

FileNotFoundError: [WinError 2] 系统找不到指定的文件。

不知是否有大神知道如何解决

南方博客的主页 南方博客 | 初学一级 | 园豆:62
提问于:2017-11-07 13:57
< >
分享
所有回答(3)
0

参考:http://blog.csdn.net/zhangda0000001/article/details/73608847?locationNum=4&fps=1

金琥 | 园豆:2570 (老鸟四级) | 2017-11-07 15:14

这个我试过了,不行

支持(0) 反对(0) 南方博客 | 园豆:62 (初学一级) | 2017-11-07 17:52
0

还有其他提示么?

shine66 | 园豆:206 (菜鸟二级) | 2017-11-07 15:24

有呢,提示倒是不少

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Mr.zhanglongqi\AppData\Local\Programs\Python\Python36\lib\site-
packages\scapy\all.py", line 16, in <module>
from .arch import *
File "C:\Users\Mr.zhanglongqi\AppData\Local\Programs\Python\Python36\lib\site-
packages\scapy\arch\__init__.py", line 95, in <module>
from .windows import *
File "C:\Users\Mr.zhanglongqi\AppData\Local\Programs\Python\Python36\lib\site-
packages\scapy\arch\windows\__init__.py", line 200, in <module>
ifaces.load_from_powershell()
File "C:\Users\Mr.zhanglongqi\AppData\Local\Programs\Python\Python36\lib\site-
packages\scapy\arch\windows\__init__.py", line 151, in load_from_powershell
for i in get_windows_if_list():
File "C:\Users\Mr.zhanglongqi\AppData\Local\Programs\Python\Python36\lib\site-
packages\scapy\arch\windows\__init__.py", line 77, in get_windows_if_list
ps = sp.Popen(['powershell', '-NoProfile', 'Get-WMIObject -class Win32_Netwo
rkAdapter', '|', 'select Name, @{Name="InterfaceIndex";Expression={$_.InterfaceI
ndex}}, @{Name="InterfaceDescription";Expression={$_.Description}},@{Name="Inter
faceGuid";Expression={$_.GUID}}, @{Name="MacAddress";Expression={$_.MacAddress.R
eplace(":","-")}} | where InterfaceGuid -ne $null', '|', 'fl'], stdout = sp.PIPE
, universal_newlines = True)
File "C:\Users\Mr.zhanglongqi\AppData\Local\Programs\Python\Python36\lib\subpr
ocess.py", line 707, in __init__
restore_signals, start_new_session)
File "C:\Users\Mr.zhanglongqi\AppData\Local\Programs\Python\Python36\lib\subpr
ocess.py", line 992, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] 系统找不到指定的文件。

支持(0) 反对(0) 南方博客 | 园豆:62 (初学一级) | 2017-11-07 17:39
0

你觉得你这样写没问题么....

import scapy.all as sa

调用sa.XXXX

北方姆Q | 园豆:1048 (小虾三级) | 2017-11-07 15:51

这样写应该是可以的啊

支持(0) 反对(0) 南方博客 | 园豆:62 (初学一级) | 2017-11-07 17:36
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册