awkman / pywifi

A cross-platform module for manipulating WiFi devices.
MIT License
447 stars 154 forks source link

NotImplementedError in MacOSX10.15 #52

Closed Rhythmicc closed 2 years ago

Rhythmicc commented 4 years ago
➜ ~ $ pip3 install pywifi
Collecting pywifi
  Downloading https://files.pythonhosted.org/packages/89/55/170a52685eeefeab36bfaf26bdca629263a0a28efffc3b556b2cc86ab966/pywifi-1.1.12-py3-none-any.whl
Installing collected packages: pywifi
Successfully installed pywifi-1.1.12
You are using pip version 19.0.3, however version 19.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
➜ ~ $ python3 
Python 3.7.4 (v3.7.4:e09359112e, Jul  8 2019, 14:54:52) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pywifi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pywifi/__init__.py", line 15, in <module>
    from .wifi import PyWiFi
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pywifi/wifi.py", line 15, in <module>
    from .iface import Interface
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pywifi/iface.py", line 15, in <module>
    raise NotImplementedError
NotImplementedError
>>> exit()
kaiwenzhou2000 commented 3 years ago

it seems like pywifi only support win or linux, and pywifi also can not run in my macbook

SylarCao commented 3 years ago

it seems like pywifi only support win or linux, and pywifi also can not run in my macbook

我也遇到了相同的问题

chankeh commented 3 years ago

same to me,how to solve the problem

Rhythmicc commented 3 years ago

same to me,how to solve the problem

write a fake class to replace pywifi. (using os.system())

magbone commented 3 years ago

https://github.com/awkman/pywifi/blob/719baf73d8d32c623dbaf5e9de5d973face152a4/pywifi/iface.py#L15 The 10th to 15th line of ifcace.py file tells that the pywifi only supports Windows and Linux platform but in MacOS it doesn't implement.

pullukse commented 2 years ago

aghhhhh why exclude mac peeps :'(((

we1x4n commented 2 years ago

直接pip install pywifi中的iface.py文件在导包的时候判断系统是没有Mac OS X

pip3 uninstall pywifi
git clone -b macos_dev https://github.com/awkman/pywifi
cd pywifi
pip3 install .

在进行import pywifi就不会报NotImplementedError

Rhythmicc commented 2 years ago

thanks!