Open ste-el-bow opened 5 years ago
network-manager/wpa_supplicant should be working in advanced before pywifi could control wifi adapters on Linux distros. pywifi manipulates wifi adapters via wpa_supplicant. Before you use pywifi, you could run "wpa_cli -i iface_name status" to check whether wpa_supplicant is already working
error while trying to import on Fedora 29
Traceback (most recent call last): File "/home/utytlanyjoe/PycharmProjects/testy/wifi/main.py", line 14, in <module> print(w.get_avaliable_interfaces()) File "/home/utytlanyjoe/PycharmProjects/testy/wifi/main.py", line 8, in get_avaliable_interfaces return self.wifi.interfaces() File "/home/utytlanyjoe/PycharmProjects/testy/venv/lib64/python3.7/site-packages/pywifi/wifi.py", line 42, in interfaces for interface in wifi_ctrl.interfaces(): File "/home/utytlanyjoe/PycharmProjects/testy/venv/lib64/python3.7/site-packages/pywifi/_wifiutil_linux.py", line 248, in interfaces for f in os.listdir(CTRL_IFACE_DIR): FileNotFoundError: [Errno 2] No such file or directory: '/var/run/wpa_supplicant'
Should be changed to result of
whereis wpa_supplicant
:wpa_supplicant: /usr/sbin/wpa_supplicant /etc/wpa_supplicant /usr/share/man/man8/wpa_supplicant.8.gz