[Rpm-maint] Python bindings: ModuleNotFoundError on custom prefix

Jun Aruga jaruga at redhat.com
Mon Sep 11 15:31:02 UTC 2017


Though it might be basic thing,
when I built latest master branch's source with ./configure --prefix, then
I did import the Python bindings, I got ModuleNotFoundError.

Could you tell me how to import it?


Below steps are what I did.

$ pwd

$ ./autogen.sh --noconfigure

$ ./configure --prefix="$(pwd)/dest"

$ make

$ make install

$ ls dest/
bin/  include/  lib/  share/  var/

$ cd python/

$ python3 -m venv ./venv

(venv) $ python setup.py build

(venv) $ python setup.py install

(venv) $ pip list
Package    Version
---------- -------
pip        9.0.1
rpm        4.14.90
setuptools 28.8.0

(venv) $ python -c 'import rpm'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/jaruga/git/rpm/python/rpm/__init__.py", line 38, in <module>
    from rpm._rpm import *
ModuleNotFoundError: No module named 'rpm._rpm'

(venv) $ python -c 'import sys; print(sys.path)'
['', '/usr/local/python-3.6.1/lib/python36.zip',

(venv) $ ls venv/lib/python3.6/site-packages/rpm/ | sort

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20170911/9d322bf8/attachment.html>

More information about the Rpm-maint mailing list