glances
glances copied to clipboard
Glances web server fails to start on windows 11.
Describe the bug Glances web server fails to start on windows 11.
I have already tried the mentioned solution from here: #3101
C:\Python313\Scripts>pip uninstall netifaces
WARNING: Skipping netifaces as it is not installed.
C:\Python313\Scripts>pip install netifaces2
Requirement already satisfied: netifaces2 in c:\python313\lib\site-packages (0.0.22)
C:\Python313\Scripts>glances.exe -w
Glances Web User Interface started on http://0.0.0.0:61208/
Glances RESTful API Server started on http://0.0.0.0:61208/api/4
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Python313\Scripts\glances.exe\__main__.py", line 7, in <module>
sys.exit(main())
~~~~^^
File "C:\Python313\Lib\site-packages\glances\__init__.py", line 173, in main
start(config=core.get_config(), args=core.get_args())
~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python313\Lib\site-packages\glances\__init__.py", line 102, in start
mode = GlancesMode(config=config, args=args)
File "C:\Python313\Lib\site-packages\glances\webserver.py", line 35, in __init__
self.web = GlancesRestfulApi(config=config, args=args)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python313\Lib\site-packages\glances\outputs\glances_restful_api.py", line 165, in __init__
self.autodiscover_client = GlancesAutoDiscoverClient(socket.gethostname().split('.', 1)[0], self.args)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python313\Lib\site-packages\glances\servers_list_dynamic.py", line 196, in __init__
zeroconf_bind_address = self.find_active_ip_address()
File "C:\Python313\Lib\site-packages\glances\servers_list_dynamic.py", line 247, in find_active_ip_address
gateway_itf = netifaces.gateways()[netifaces.AF_INET][0][1]
~~~~~~~~~~~~~~~~~~^^
File "C:\Python313\Lib\site-packages\netifaces\__init__.py", line 232, in gateways
raise NotImplementedError("No implementation for `gateways()` yet")
NotImplementedError: No implementation for `gateways()` yet
FWIW the opposite of that solution has been working for me. I.e. glances installs netifaces2 but actually only works with netifaces:
pip uninstall netifaces2
pip install netifaces
But I would love to not have to do that, +1 :)
Related issues:
- https://github.com/nicolargo/glances/issues/3072
- https://github.com/nicolargo/glances/issues/3055
FWIW the opposite of that solution has been working for me. I.e. glances installs
netifaces2but actually only works withnetifaces:pip uninstall netifaces2 pip install netifacesBut I would love to not have to do that, +1 :)
I tried it the other way around, but that didn’t work for me either. :(
Can i do anything to help with the test or with the investigation of this?
I am having the same exact issue too... Only the webserver version is not working. Glances in terminal works fine.
pip uninstall netifaces2 pip install netifaces-plus This works for me.
pip uninstall netifaces2 pip install netifaces-plus This works for me.
This works
Same problem still occurs in latest version. I have installed everything 'fresh' (all python packages), I updated all and spent hours to solve cause of error.
Python 3.13.3 pip 25.1.1 Glances version: 4.3.1 Glances API version: 4 PsUtil version: 7.0.1
Exactly same error message as one above.
After saw this issue, I uninstalled netifaces2, installed netifaces and then problem solved.
This issue is stale because it has been open for 3 months with no activity.
pip uninstall netifaces2 pip install netifaces-plus
This works for me.