Python3 - wifi库不能与Cell.all一起运行(" wlan0")

时间:2016-08-09 08:59:04

标签: python python-3.x wifi

我尝试使用wifi库进行python3(https://wifi.readthedocs.io/en/latest/index.html)但是当我使用Cell.all(" wlan0")时出现此错误:

Microsoft Windows [Versione 10.0.10586]
(c) 2015 Microsoft Corporation. Tutti i diritti sono riservati.

C:\WINDOWS\system32>python
Python 3.5.1 (v3.5.1:37a07cee5969, Dec  6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from wifi import Cell, scheme
>>> list(Cell.all("wlan0"))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "c:\users\-----\appdata\local\programs\python\python35\lib\site-packages\wifi\scan.py", line 39, in all
    stderr=subprocess.STDOUT)
  File "c:\users\-----\appdata\local\programs\python\python35\lib\subprocess.py", line 629, in check_output
    **kwargs).stdout
  File "c:\users\-----o\appdata\local\programs\python\python35\lib\subprocess.py", line 696, in run
    with Popen(*popenargs, **kwargs) as process:
  File "c:\users\-----\appdata\local\programs\python\python35\lib\subprocess.py", line 950, in __init__
    restore_signals, start_new_session)
  File "c:\users\-----\appdata\local\programs\python\python35\lib\subprocess.py", line 1220, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] Impossibile trovare il file specificato
>>>

P.S。抱歉我的英语不好(我意大利语)

1 个答案:

答案 0 :(得分:1)

由于您运行的是Windows,因此出现此错误。 wifi库仅为Linux系统设计,如文档中所述。