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

SES: No module named 'west.main', Project won't build without error

I was finally able to get a project to build using Zephyr command line by placing the project within the "ncs" folder where "west build" was recognized. I haven't been able to track down this bug:

Loading solution hello_world.emProject
Executing load commands
/usr/local/bin/cmake -GNinja -DBOARD=nrf5340_dk_nrf5340_cpuapp -DBOARD_DIR=/Users/matt/Documents/Software/ncs/zephyr/boards/arm/nrf5340_dk_nrf5340 -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=/opt/gnuarmemb -B/Users/matt/Documents/Software/ncs/my_projects/hello_world/build_nrf5340_dk_nrf5340_cpuapp -H/Users/matt/Documents/Software/ncs/my_projects/hello_world -DPYTHON_EXECUTABLE=/usr/local/bin/python3 -DCMAKE_MAKE_PROGRAM=/usr/local/bin/ninja -DDTC=/usr/local/bin/dtc -D WEST=~/Library/Python/3.7/bin/west -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=/Users/matt/Documents/Software/arm_segger_embedded_studio_v442a_macos_x64_nordic/html/configure_nordic_project_menuconfig.py
-- Zephyr version: 2.1.99
-- Selected BOARD nrf5340_dk_nrf5340_cpuapp
-- Found west: /Users/matt/Library/Python/3.7/bin/west (found suitable version "0.7.1", minimum required is "0.6.0")
Traceback (most recent call last):
  File "/Users/matt/Library/Python/3.7/bin/west", line 5, in <module>
    from west.main import main
ModuleNotFoundError: No module named 'west.main'
Traceback (most recent call last):
  File "/Users/matt/Library/Python/3.7/bin/west", line 5, in <module>
    from west.main import main
ModuleNotFoundError: No module named 'west.main'

CMake Error at /Users/matt/Documents/Software/ncs/zephyr/cmake/zephyr_module.cmake:45 (message):
  Traceback (most recent call last):

    File "/Users/matt/Documents/Software/ncs/zephyr/scripts/zephyr_module.py", line 236, in <module>
      main()
    File "/Users/matt/Documents/Software/ncs/zephyr/scripts/zephyr_module.py", line 200, in main
      returncode=p.returncode)

  subprocess.CalledProcessError: Command
  '['/Users/matt/Library/Python/3.7/bin/west', 'list',
  '--format={posixpath}']' returned non-zero exit status 1.

Call Stack (most recent call first):
  /Users/matt/Documents/Software/ncs/zephyr/cmake/app/boilerplate.cmake:458 (include)
  CMakeLists.txt:3 (include)


-- Configuring incomplete, errors occurred!
See also "/Users/matt/Documents/Software/ncs/my_projects/hello_world/build_nrf5340_dk_nrf5340_cpuapp/CMakeFiles/CMakeOutput.log".
See also "/Users/matt/Documents/Software/ncs/my_projects/hello_world/build_nrf5340_dk_nrf5340_cpuapp/CMakeFiles/CMakeError.log".
Project load failed
Reported error: solution load command failed (1)

I have tried redownloading the gnuarmemb, updating west, made sure all my dependencies exist (I followed the nRF Connect Getting Started guide). What am I missing?

Parents Reply Children
No Data
Related