Skip to content

Import error on Windows #1334

@nehaljwani

Description

@nehaljwani
import: 'pyroute2'
Traceback (most recent call last):
  File "\path\to\run_test.py", line 2, in <module>
    import pyroute2
  File "\path\to\lib\site-packages\pyroute2\__init__.py", line 16, in <module>
    from pyroute2.cli.console import Console
  File "\path\to\lib\site-packages\pyroute2\cli\console.py", line 7, in <module>
    from pyroute2.ndb.main import NDB
  File "\path\to\lib\site-packages\pyroute2\ndb\main.py", line 290, in <module>
    from .view import SourcesView, View
  File "\path\to\lib\site-packages\pyroute2\ndb\view.py", line 73, in <module>
    from .source import Source, SourceProxy
  File "\path\to\lib\site-packages\pyroute2\ndb\source.py", line 73, in <module>
    from pyroute2.iproute import IPRoute
  File "\path\to\lib\site-packages\pyroute2\iproute\__init__.py", line 5, in <module>
    from pyroute2.iproute.linux import RTNL_API, IPBatch
  File "\path\to\lib\site-packages\pyroute2\iproute\linux.py", line 72, in <module>
    from pyroute2.netlink.rtnl.iprsocket import AsyncIPRSocket, ChaoticIPRSocket
  File "\path\to\lib\site-packages\pyroute2\netlink\rtnl\iprsocket.py", line 19, in <module>
    from pyroute2.netlink.rtnl.ifinfmsg.tuntap import manage_tun, manage_tuntap
  File "\path\to\lib\site-packages\pyroute2\netlink\rtnl\ifinfmsg\tuntap.py", line 4, in <module>
    from fcntl import ioctl
ModuleNotFoundError: No module named 'fcntl'

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