, wenn ich versuche, das Beispielskript von pyroute2 Modul auszuführen:Pyroute2 Importfehler - Import AF_BRIDGE
from pyroute2 import IPRoute
ip = IPRoute()
print([x.get_attr('IFLA_IFNAME') for x in ip.get_links()])
ich die folgende Fehlermeldung erhalten:
Traceback (most recent call last):
File "ex.py", line 2, in <module>
ip = IPRoute()
File "C:\Python35\lib\site-packages\pyroute2\__init__.py", line 122, in __new_
_
cls.register(cls.registry['class'])
File "C:\Python35\lib\site-packages\pyroute2\__init__.py", line 102, in __geti
tem__
[name], 0)
File "C:\Python35\lib\site-packages\pyroute2\iproute.py", line 175, in <module
>
from socket import AF_BRIDGE
ImportError: cannot import name 'AF_BRIDGE'
Die wichtigste Plattform I‘ m versucht, pyroute2 zu benutzen, ist OpenBSD, aber das Problem bleibt für andere Plattformen wie Windows bestehen.
Ich testete dies um python3.5 und python2.7 zusätzlich zu python3.4.
Ich weiß einfach nicht, wie ich dieses Problem lösen kann. eine Idee?
dank
Als Hauptentwickler bei gith angegeben ub, es ist für Linux und funktioniert nicht auf anderen Plattformen. – AhmedWise