Skip to content

libnl dependency seemingly not satisfied #7

@erik-overdahl

Description

@erik-overdahl

Bug Report

I had to install the latest version (0.3.0) of libnl from PyPi; without it, wifi-survey failed immediately with

$ wifi-survey help
Traceback (most recent call last):
  File "/home/francis/.local/src/python-wifi-survey-heatmap/.venv2/bin/wifi-survey", line 33, in <module>
    sys.exit(load_entry_point('wifi-survey-heatmap', 'console_scripts', 'wifi-survey')())
  File "/home/francis/.local/src/python-wifi-survey-heatmap/.venv2/bin/wifi-survey", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib64/python3.8/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/francis/.local/src/python-wifi-survey-heatmap/wifi_survey_heatmap/ui.py", line 46, in <module>
    from wifi_survey_heatmap.collector import Collector
  File "/home/francis/.local/src/python-wifi-survey-heatmap/wifi_survey_heatmap/collector.py", line 41, in <module>
    from wifi_survey_heatmap.libnl import Scanner
  File "/home/francis/.local/src/python-wifi-survey-heatmap/wifi_survey_heatmap/libnl.py", line 55, in <module>
    import libnl.handlers
ModuleNotFoundError: No module named 'libnl'

pip install libnl installs libnl0.2.0, which still does not work - needs to be `pip install libnl3.

Even with libnl3 installed, scancli.py offers up this error

23:40  ~/.local/src/python-wifi-survey-heatmap
$ ./wifi_survey_heatmap/scancli.py 
Traceback (most recent call last):
  File "./wifi_survey_heatmap/scancli.py", line 44, in <module>
    from wifi_survey_heatmap.collector import Collector
  File "/home/francis/.local/src/python-wifi-survey-heatmap/wifi_survey_heatmap/collector.py", line 41, in <module>
    from wifi_survey_heatmap.libnl import Scanner
  File "/home/francis/.local/src/python-wifi-survey-heatmap/wifi_survey_heatmap/libnl.py", line 55, in <module>
    import libnl.handlers
  File "/home/francis/.local/src/python-wifi-survey-heatmap/wifi_survey_heatmap/libnl.py", line 55, in <module>
    import libnl.handlers
ModuleNotFoundError: No module named 'libnl.handlers'; 'libnl' is not a package

scancli.py isn't mentioned in the README, but I was looking for somewhere to get the version info - I don't seem to have 1wifi-survey-heatmapand the other commands do not have a--version` flag.

Version

Most recent commit

Installation Method

git clone https://github.com/jantman/python-wifi-survey-heatmap.git
virtuelenv --system-site-packages --prompt "(wifi-heatmap)" .venv
source ./.venv/bin/activate
python setup.py develop

Supporting Software Versions

$ neofetch
          /:-------------:\          francis@francis-remote 
       :-------------------::        ---------------------- 
     :-----------/shhOHbmp---:\      OS: Fedora release 32 (Thirty Two) x86_64 
   /-----------omMMMNNNMMD  ---:     Host: P2540UA 1.0 
  :-----------sMMMMNMNMP.    ---:    Kernel: 5.10.11-100.fc32.x86_64 
 :-----------:MMMdP-------    ---\   Uptime: 2 days, 10 hours, 14 mins 
,------------:MMMd--------    ---:   Packages: 2814 (rpm) 
:------------:MMMd-------    .---:   Shell: bash 5.0.17 
:----    oNMMMMMMMMMNho     .----:   Resolution: 1920x1080, 1920x1080 
:--     .+shhhMMMmhhy++   .------/   WM: i3 
:-    -------:MMMd--------------:    Theme: Adwaita [GTK2] 
:-   --------/MMMd-------------;     Icons: Adwaita [GTK2] 
:-    ------/hMMMy------------:      Terminal: gnome-terminal 
:-- :dMNdhhdNMMNo------------;       CPU: Intel i5-7200U (4) @ 3.100GHz 
:---:sdNMMMMNds:------------:        GPU: Intel HD Graphics 620 
:------:://:-------------::          Memory: 1879MiB / 31988MiB 
:---------------------://
                                          
$ python --version
Python 3.8.7

$ virtualenv --version
virtualenv 20.4.2 from /home/francis/.local/lib/python3.8/site-packages/virtualenv/__init__.py

Actual Output

23:25  ~/.local/src/python-wifi-survey-heatmap
$ wifi-survey --help
Traceback (most recent call last):
  File "/home/francis/.local/src/python-wifi-survey-heatmap/.venv2/bin/wifi-survey", line 33, in <module>
    sys.exit(load_entry_point('wifi-survey-heatmap', 'console_scripts', 'wifi-survey')())
  File "/home/francis/.local/src/python-wifi-survey-heatmap/.venv2/bin/wifi-survey", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib64/python3.8/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/francis/.local/src/python-wifi-survey-heatmap/wifi_survey_heatmap/ui.py", line 46, in <module>
    from wifi_survey_heatmap.collector import Collector
  File "/home/francis/.local/src/python-wifi-survey-heatmap/wifi_survey_heatmap/collector.py", line 41, in <module>
    from wifi_survey_heatmap.libnl import Scanner
  File "/home/francis/.local/src/python-wifi-survey-heatmap/wifi_survey_heatmap/libnl.py", line 55, in <module>
    import libnl.handlers
ModuleNotFoundError: No module named 'libnl'

Expected Output

$ wifi-survey --help
[2021-02-12 23:31:51,960 WARNING] You should run this script as root to be able to trigger Wi-Fi scans.
usage: wifi-survey [-h] [-v] [-S] [-s IPERF3_SERVER] [-d IPERF3_DURATION] [-b BSSID] [--ding DING] [--ding-command DING_COMMAND] [-i INTERFACE] [-p IMAGE] [-t TITLE]

wifi survey data collection UI

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         verbose output. specify twice for debug-level output.
  -S, --scan            Scan for access points in the vicinity
  -s IPERF3_SERVER, --server IPERF3_SERVER
                        iperf3 server IP or hostname
  -d IPERF3_DURATION, --duration IPERF3_DURATION
                        Duration of each individual ipref3 test run
  -b BSSID, --bssid BSSID
                        Restrict survey to this BSSID
  --ding DING           Path to audio file to play when measurement finishes
  --ding-command DING_COMMAND
                        Path to ding command
  -i INTERFACE, --interface INTERFACE
                        Wireless interface name
  -p IMAGE, --picture IMAGE
                        Path to background image
  -t TITLE, --title TITLE
                        Title for survey (and data filename)

Testing Assistance

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions