Import error after the latest update (a3dedae)
reeshabhranjan opened this issue · 2 comments
reeshabhranjan commented
user@server2:~/python-netfilterqueue$ python3
Python 3.8.10 (default, Nov 26 2021, 20:14:08)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import netfilterqueue
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/python-netfilterqueue/netfilterqueue/__init__.py", line 1, in <module>
from ._impl import (
ModuleNotFoundError: No module named 'netfilterqueue._impl'
>>>
reeshabhranjan commented
This happened when I installed from source.
oremanj commented
@reeshabhranjan Please run Python from anywhere other than the python-netfilterqueue
directory. When you're in that directory, import netfilterqueue
locates ./netfilterqueue
rather than /usr/local/lib/python3.8/site-packages/netfilterqueue
. The compiled module is only installed in the latter location.
Alternatively, you can run python3 setup.py build_ext
to build the extension in ./netfilterqueue
also.