intrig-unicamp / mininet-wifi

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

E: Package 'pep8' has no installation candidate during install.sh #536

Open emdneto opened 2 months ago

emdneto commented 2 months ago

OS: Ubuntu 24.04 LTS Linux mn-wifi 6.7.11-orbstack SMP Sat Mar 30 12:20:36 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

sudo util/install.sh -Wlnfv

Detected Linux distribution: Ubuntu 24.04 noble amd64
Ubuntu
sys.version_info(major=3, minor=12, micro=3, releaselevel='final', serial=0)
Detected Python (python3) version 3
Installing Mininet dependencies
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package pep8 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'pep8' has no installation candidate

Investigate and fix that. ensure mn-wifi install on ubuntu 24.04 LTS. I'll work on this.

emdneto commented 2 months ago

Maybe replace by python3-pep8 https://packages.ubuntu.com/search?keywords=python3-pep8

Jagadeesh-Kalyanshetti-X commented 1 month ago

I ran into the same issue recently. Here's the solution that worked for me:

  1. Open the terminal (Ctrl + Alt + T).
  2. If your mininet-wifi is in the home directory then copy-paste this command --> cd mininet-wifi/util (OR) Navigate to mininet-wifi directory in your machine via terminal and then change directory to util.
  3. Type --> gedit install.sh
  4. Click on the hamburger icon (three horizontal lines) next to the save option.
  5. Select 'Find and Replace'.
  6. In the 'Find' field, type --> pep8. In the 'Replace' field, type --> pycodestyle.
  7. Click 'Replace All' and save the file.
  8. Navigate back to the mininet-wifi directory by typing --> cd ..
  9. Everything is all set now. Ensure you are in the mininet-wifi directory and verify if the command works --> sudo util/install.sh -Wlnfv

Explanation of the Issue and Resolution:

The pep8 package was previously used to check Python code against the style conventions in PEP 8. It has since been replaced by pycodestyle, which is why pep8 is no longer available as an installation candidate in Ubuntu 23 and higher.

We resolved this by replacing all instances of pep8 in the install.sh file with pycodestyle. This ensures that any functionality related to pep8 required by mininet-wifi is now directed to pycodestyle.

Toyin-Osun commented 2 weeks ago

I have followed the steps above to resolve the issue raised which I also encountered while trying to install mininet-wifi in ubuntu 24.04. Any one with solution