路径中找不到PortScannerError'nmap程序'(但它在路径中)

时间:2017-07-28 13:49:02

标签: python windows pyinstaller nmap

我收到错误,在我的PATH中找不到nmap(使用python-nmap)。但是,它在我的路径中。

当我在Python中执行我的脚本时,Nmap正常工作,但是当我使用pyinstaller将代码冻结为.exe文件时,我在尝试运行代码时出现此错误:

Traceback (most recent call last):
  File "utils\map_network.py", line 7, in scan_network
  File "site-packages\nmap\nmap.py", line 131, in __init__
PortScannerError: 'nmap program was not found in path. PATH is : 

C:\\Program Files (x86)\\Intel\\iCLS Client\\;
C:\\Program Files\\Intel\\iCLS Client\\;
C:\\ProgramData\\Oracle\\Java\\javapath;
C:\\windows\\system32;C:\\windows;
C:\\windows\\System32\\Wbem;
C:\\windows\\System32\\WindowsPowerShell\\v1.0\\;
C:\\Python27\\;
C:\\Python27\\Scripts\\;
C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;
C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;
C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;
C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;

C:\\Program Files (x86)\\Nmap;

C:\\Users\\sillico\\AppData\\Local\\Microsoft\\WindowsApps;
C:\\Users\\sillico\\AppData\\Local\\Programs\\Git\\cmd'

如您所见,我的PATH中有Nmap。有什么想法吗?

1 个答案:

答案 0 :(得分:0)

我设法通过升级到Python 3.5来解决这个错误。使用的是Python 2.7。

相关问题