intrig-unicamp / mininet-wifi

Emulator for Software-Defined Wireless Networks
https://mn-wifi.readthedocs.io/
Other
457 stars 245 forks source link

Matplotlib incompatible versions #510

Open prximenes opened 1 year ago

prximenes commented 1 year ago

Hello, I have a problem using the library with the latest versions of matplotlib. In matplotlib version 3.7.2 (https://github.com/matplotlib/matplotlib/releases/tag/v3.7.2), the following support has been removed:

"Remove some NumPy function overrides from pylab"

In the "mn_wifi/vanet.py" file, some functions are imported as follows, which is no longer supported:

https://github.com/intrig-unicamp/mininet-wifi/blob/f1ac7d7eb670ed2020e64226007107f69c9aa644/mn_wifi/vanet.py#L17

I'll try to solve it by downgrading matplotlib to version 3.7.1, but anyone who installs via apt cannot install an outdated version.

fpoltronieri commented 1 year ago

Hi, I found the same issue. I modified the Dockerfile to install matplotlib 3.7.1 but the error persist. Do you have any idea how to proceed? Should I downgrade numpy as well?

JVMergulho commented 1 year ago

Hi, I found the same issue. I modified the Dockerfile to install matplotlib 3.7.1 but the error persist. Do you have any idea how to proceed? Should I downgrade numpy as well?

Hello, I solved this issue by modifying the way that "math" was imported in the "mn_wifi/vanet.py" and "mn_wifi/replaying.py" files. I just deleted "from pylab import math" and added "import math" in both files and now it seems to be working correctly with the latest version of matplotlib.

I forked the mininet-wifi and made these changes here: mininet-wifi modified