2.3 Install Python Dependencies and Get Zephyr Source
- Install Python “venv” package.
$ sudo apt install python3-venv
- Create a new virtual environment.
$ python3 -m venv ~/zephyrproject/.venv
- Activate the virtual environment.
$ source ~/zephyrproject/.venv/bin/activate
Note: Remember to activate the virtual environment every time you start working. - Install “west”.
$ pip install west
- Get the Zephyr source code.
-
$ west init ~/zephyrproject
-
$ cd ~/zephyrproject
-
$ west update
-
- Export a Zephyr CMake
package.
$ west zephyr-export
- Install the dependencies using
pip.
$ pip install -r ~/zephyrproject/zephyr/scripts/requirements.txt