Search code examples
pythonpipeasy-install

Problems installing python module pybfd


I've been trying to install the pybfd module but nothing works so far.

Tried the following:

pip install pybfd returns error: option --single-version-externally-managed not recognized. After a quick search I found the --egg option for pip which seems to work, says successfully installed but when I try to run my code ImportError: No module named pybfd.bfd

easy_install pybfd returns an error as well: Writing /tmp/easy_install-oZUgBf/pybfd-0.1.1/setup.cfg Running pybfd-0.1.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-oZUgBf/pybfd-0.1.1/egg-dist-tmp-gWwhoT [-] Error : unable to determine correct include path for bfd.h / dis-asm.h No eggs found in /tmp/easy_install-oZUgBf/pybfd-0.1.1/egg-dist-tmp-gWwhoT (setup script problem?)

For the last attempt I downloaded the pybfd repo from GitHub and ran the setup script: [-] Error : unable to determine correct include path for bfd.h / dis-asm.h

Does anyone have any idea what could be causing all this and how to actually install the module ?


Solution

  • After some trial and error I discovered that binutils-dev and python-dev packages were missing and causing the header path errors. After installing those the setup script worked.