Hi Thomas,
Could it be that your
/usr/bin/python is not the
same python you used to install west? i.e. do you have
multiple python installations on your system?
$ cat `which
west` | grep '#!'
In my case this yields:
#!/usr/bin/python3
which matches my:
Found
PythonInterp: /usr/bin/python3
Carles
I'm just
starting up my IAR porting effort again and thought I would
just build a simple out of the box project with the standard
tools, but I'm immediately running into issues.
I'm on Ubuntu 18.04.4 LTS and have followed
https://docs.zephyrproject.org/latest/getting_started/index.html
---
thomasto@thomasto-VirtualBox:~/zephyrproject/zephyr$
west build -p auto -b stm32f746g_disco
samples/basic/blinky
-- west build: build configuration:
source directory:
/home/thomasto/zephyrproject/zephyr/samples/basic/blinky
build directory:
/home/thomasto/zephyrproject/zephyr/build (created)
BOARD: stm32f746g_disco (origin: command line)
-- west build: generating a build system
-- Zephyr version: 2.2.0-rc3
-- Found PythonInterp: /usr/bin/python (found suitable
version "3.7.5", minimum required is "3.6")
-- Selected BOARD stm32f746g_disco
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'west'
Error in sys.excepthook:
Traceback (most recent call last):
File
"/usr/lib/python3/dist-packages/apport_python_hook.py",
line 63, in apport_excepthook
from apport.fileutils import likely_packaged,
get_recent_crashes
File
"/usr/lib/python3/dist-packages/apport/__init__.py", line
5, in <module>
from apport.report import Report
File
"/usr/lib/python3/dist-packages/apport/report.py", line
30, in <module>
import apport.fileutils
File
"/usr/lib/python3/dist-packages/apport/fileutils.py", line
23, in <module>
from apport.packaging_impl import impl as packaging
File
"/usr/lib/python3/dist-packages/apport/packaging_impl.py",
line 24, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py",
line 23, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Original exception was:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'west'
CMake Error at
/home/thomasto/zephyrproject/zephyr/cmake/host-tools.cmake:26
(message):
Unable to import west.version from '/usr/bin/python'
Call Stack (most recent call first):
/home/thomasto/zephyrproject/zephyr/cmake/app/boilerplate.cmake:443
(include)
CMakeLists.txt:4 (include)
-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1:
/usr/bin/cmake -B/home/thomasto/zephyrproject/zephyr/build
-S/home/thomasto/zephyrproject/zephyr/samples/basic/blinky
-GNinja -DBOARD=stm32f746g_disco
---
Looks like I'm missing some step.
Thomas