Lines Matching +full:west +full:- +full:commands

1 .. _west-troubleshooting:
3 Troubleshooting West
6 This page covers common issues with west and how to solve them.
8 ``west update`` fetching failures
11 One good way to troubleshoot fetching issues is to run ``west update`` in
14 .. code-block:: shell
16 west -v update
18 The output includes Git commands run by west and their outputs. Look for
21 .. code-block:: none
24 west.manifest: your_project: checking if cloned
25 [...other west.manifest logs...]
26 --- your_project: fetching, need revision SOME_SHA
27west.manifest: running 'git fetch ... https://github.com/your-username/your_project ...' in /some/…
37 ``curl -v FETCH_URL`` (for HTTPS URLs) or ``ssh -v FETCH_URL`` (for SSH URLs)
41 for a password when you run it directly, you will be able to run ``west
44 "'west' is not recognized as an internal or external command, operable program or batch file.'
47 On Windows, this means that either west is not installed, or your :envvar:`PATH`
49 :file:`west.exe`.
51 First, make sure you've installed west; see :ref:`west-install`. Then try
52 running ``west`` from a new ``cmd.exe`` window. If that still doesn't work,
55 You need to find the directory containing :file:`west.exe`, then add it to your
62 pip3 show west
67 C:\foo\python\python38\lib\site-packages``. The exact location
69 #. Look for a file named ``west.exe`` in the ``scripts`` directory
74 Notice how ``lib\site-packages`` in the ``pip3 show`` output was changed
76 #. If you see ``west.exe`` in the ``scripts`` directory, add the full path to
84 ``west``.
89 This error occurs on some Linux distributions after upgrading to west 0.7.0 or
92 .. code-block:: none
94 $ west update
99 west issue 373`_ for details. Some versions of **Ubuntu** and **Linux Mint** are known to
105 .. _this comment in west issue 373:
106 https://github.com/zephyrproject-rtos/west/issues/373#issuecomment-583489272
110 .. code-block:: none
112 $ pip3 show west | grep Location: | cut -f 2 -d ' '
113 /home/foo/.local/lib/python3.6/site-packages
114 $ rm -r /home/foo/.local/lib/python3.6/site-packages/west
115 $ pip3 install --user west==0.7.0
117 **Workaround 2**: install west in a Python virtual environment
131 command (like :ref:`west flash <west-flashing>`, :ref:`west build
132 <west-building>`, etc.):
134 .. code-block:: none
136 $ west build [...]
137 west: error: argument <command>: invalid choice: 'build' (choose from 'init', [...])
139 $ west flash [...]
140 west: error: argument <command>: invalid choice: 'flash' (choose from 'init', [...])
143 :ref:`west workspace <west-workspace>`. West needs to know where your workspace
144 is to find :ref:`west-extensions`.
151 For example, create your build directory inside the workspace, or run ``west
152 flash --build-dir YOUR_BUILD_DIR`` from inside the workspace.
154 #. Set the :envvar:`ZEPHYR_BASE` :ref:`environment variable <env_vars>` and re-run
155 the west extension command. If set, west will use :envvar:`ZEPHYR_BASE` to
158 If you're unsure whether a command is built-in or an extension, run ``west
159 help`` from inside your workspace. The output prints extension commands
162 .. code-block:: none
164 $ west help
166 built-in commands for managing git repositories:
167 init: create a west workspace
170 other built-in commands:
171 help: get help for west or a command
174 extension commands from project manifest (path: zephyr):
179 "invalid choice: 'post-init'"
182 If you see this error when running ``west init``:
184 .. code-block:: none
186 west: error: argument <command>: invalid choice: 'post-init'
190 Then you have an old version of west installed, and are trying to use it in a
193 The easiest way to resolve this issue is to upgrade west and retry as follows:
195 #. Install the latest west with the ``-U`` option for ``pip3 install`` as shown
196 in :ref:`west-install`.
198 #. Back up any contents of :file:`zephyrproject/.west/config` that you want to
202 #. Completely remove the :file:`zephyrproject/.west` directory (if you don't,
205 #. Run ``west init`` again.
210 You may see this error when running ``west init`` with west 0.6:
212 .. code-block:: none
216 If this is unexpected and you're really trying to create a new west workspace,
217 then it's likely that west is using the :envvar:`ZEPHYR_BASE` :ref:`environment
221 any directory and still use west to build, flash, and debug them, for example.