This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf connect sdk (ModuleNotFoundError: No module named 'elftools')

hi all, 

i download the project from github master branch, i also added  " pip3 install -r zephyr/scripts/requirements.txt " but still, i got the same issue. i had read from an article on the same issues mention, 

1. if i download "https://pypi.org/project/pyelftools/#files" where should i add the file to ?

2. is there any other ways to solve this problem ?

  • I too am getting this.
    I have updated from ncs1.6.1 to 1.70; modified tag in west.yml; then west update.

    I create a nw build of my project using SES->open nrf connect sdk project; then kick off a build in SES which exits with....

    1> FAILED: zephyr/include/generated/driver-validation.h
    1> cmd.exe /C "cd /D C:\Users\Owain\incus\nova\projects\test\build_nova2_nrf5340_cpuappns\spm\zephyr && C:\Python39\python.exe C:/Users/Owain/incus/zephyr/scripts/gen_kobject_list.py --validation-output C:/Users/Owain/incus/nova/projects/test/build_nova2_nrf5340_cpuappns/spm/zephyr/include/generated/driver-validation.h --include C:/Users/Owain/incus/nova/projects/test/build_nova2_nrf5340_cpuappns/spm/zephyr/misc/generated/struct_tags.json "
    1> Traceback (most recent call last):
    1> File "C:\Users\Owain\incus\zephyr\scripts\gen_kobject_list.py", line 62, in <module>
    1> import elftools
    1> ModuleNotFoundError: No module named 'elftools'


    I check installed versions...

    C:\WINDOWS\system32>which pip
    /cygdrive/c/Python39/Scripts/pip

    C:\WINDOWS\system32>pip install pyelftools
    Requirement already satisfied: pyelftools in c:\python39\lib\site-packages (0.27)
    WARNING: You are using pip version 21.1.3; however, version 21.2.4 is available.
    You should consider upgrading via the 'c:\python39\python.exe -m pip install --upgrade pip' command.

    C:\WINDOWS\system32>pip show pyelftools
    Name: pyelftools
    Version: 0.27
    Summary: Library for analyzing ELF files and DWARF debugging information
    Home-page: github.com/.../pyelftools
    Author: Eli Bendersky
    Author-email: [email protected]
    License: Public domain
    Location: c:\python39\lib\site-packages
    Requires:
    Required-by:

    C:\WINDOWS\system32>

    Any ideas how to fix?

  • Hello Owain,

    OwainIncus said:
    Any ideas how to fix?

    have you gone through this chapter before upgrading to NCS v1.7.0? Otherwise I would recommend you to completely uninstall the NCS toolchain and reinstall it after upgrading all necessary tools.

    Regards,

    Markus

Related