<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>VS Code Extension - west flash fails from missing python dependencies</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/100164/vs-code-extension---west-flash-fails-from-missing-python-dependencies</link><description>When trying to flash the hello world program onto an Adafruit nRF52840 Feather through a j link it fails with &amp;quot;FATAL ERROR: one or more Python dependencies were missing; see the getting started guide for details on how to fix&amp;quot;. I installed the dependencies</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 29 Jul 2024 18:19:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/100164/vs-code-extension---west-flash-fails-from-missing-python-dependencies" /><item><title>RE: VS Code Extension - west flash fails from missing python dependencies</title><link>https://devzone.nordicsemi.com/thread/496078?ContentTypeID=1</link><pubDate>Mon, 29 Jul 2024 18:19:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f9e036f-df95-4307-a346-c270934e93d2</guid><dc:creator>tschmitz</dc:creator><description>&lt;p&gt;Had the same problem, but this worked for me in Ubuntu 22.04:&lt;br /&gt;&lt;br /&gt;1. Open the toolchain manager, click on the dropdown arrow, and select &amp;quot;Generate environment script.&amp;quot; Save the script to a location of your choice.&lt;/p&gt;
&lt;p&gt;2. Open a terminal and source the environment script that you just generated (i.e source env.sh)&lt;/p&gt;
&lt;p&gt;3. Find where the nordic toolchain is installed and navigate to it in the terminal (example path: ~/ncs/toolchains/2be090971e)&lt;/p&gt;
&lt;p&gt;4. Run &amp;quot;./usr/local/bin/pip install pylink&amp;quot;&lt;/p&gt;
&lt;p&gt;5. Open environment.json inside the toolchain directory, under the &amp;quot;LD_LIBRARY_PATH&amp;quot; key, add the following value to the list:&lt;br /&gt;&amp;quot;opt/nanopb/generator-bin/&amp;quot;&lt;br /&gt;&lt;br /&gt;After you add that value, your environment JSON file should look like this:&lt;br /&gt;&lt;pre class="ui-code" data-mode="json"&gt;{
  &amp;quot;env_vars&amp;quot;: [
    {
      &amp;quot;type&amp;quot;: &amp;quot;relative_paths&amp;quot;,
      &amp;quot;key&amp;quot;: &amp;quot;PATH&amp;quot;,
      &amp;quot;values&amp;quot;: [
        &amp;quot;bin&amp;quot;,
        &amp;quot;usr/bin&amp;quot;,
        &amp;quot;usr/local/bin&amp;quot;,
        &amp;quot;opt/bin&amp;quot;,
        &amp;quot;opt/nanopb/generator-bin&amp;quot;,
        &amp;quot;opt/zephyr-sdk/aarch64-zephyr-elf/bin&amp;quot;,
        &amp;quot;opt/zephyr-sdk/x86_64-zephyr-elf/bin&amp;quot;,
        &amp;quot;opt/zephyr-sdk/arm-zephyr-eabi/bin&amp;quot;,
        &amp;quot;opt/zephyr-sdk/riscv64-zephyr-elf/bin&amp;quot;
      ],
      &amp;quot;existing_value_treatment&amp;quot;: &amp;quot;prepend_to&amp;quot;
    },
    {
      &amp;quot;type&amp;quot;: &amp;quot;relative_paths&amp;quot;,
      &amp;quot;key&amp;quot;: &amp;quot;LD_LIBRARY_PATH&amp;quot;,
      &amp;quot;values&amp;quot;: [
        &amp;quot;lib&amp;quot;,
        &amp;quot;lib/x86_64-linux-gnu&amp;quot;,
        &amp;quot;usr/local/lib&amp;quot;,
        &amp;quot;opt/nanopb/generator-bin/&amp;quot;
      ],
      &amp;quot;existing_value_treatment&amp;quot;: &amp;quot;prepend_to&amp;quot;
    },
    {
      &amp;quot;type&amp;quot;: &amp;quot;relative_paths&amp;quot;,
      &amp;quot;key&amp;quot;: &amp;quot;GIT_EXEC_PATH&amp;quot;,
      &amp;quot;values&amp;quot;: [
        &amp;quot;usr/local/libexec/git-core&amp;quot;
      ],
      &amp;quot;existing_value_treatment&amp;quot;: &amp;quot;overwrite&amp;quot;
    },
    {
      &amp;quot;type&amp;quot;: &amp;quot;relative_paths&amp;quot;,
      &amp;quot;key&amp;quot;: &amp;quot;GIT_TEMPLATE_DIR&amp;quot;,
      &amp;quot;values&amp;quot;: [
        &amp;quot;usr/local/share/git-core/templates&amp;quot;
      ],
      &amp;quot;existing_value_treatment&amp;quot;: &amp;quot;overwrite&amp;quot;
    },
    {
      &amp;quot;type&amp;quot;: &amp;quot;relative_paths&amp;quot;,
      &amp;quot;key&amp;quot;: &amp;quot;PYTHONHOME&amp;quot;,
      &amp;quot;values&amp;quot;: [
        &amp;quot;usr/local&amp;quot;
      ],
      &amp;quot;existing_value_treatment&amp;quot;: &amp;quot;overwrite&amp;quot;
    },
    {
      &amp;quot;type&amp;quot;: &amp;quot;relative_paths&amp;quot;,
      &amp;quot;key&amp;quot;: &amp;quot;PYTHONPATH&amp;quot;,
      &amp;quot;values&amp;quot;: [
        &amp;quot;usr/local/lib/python3.9&amp;quot;,
        &amp;quot;usr/local/lib/python3.9/site-packages&amp;quot;
      ],
      &amp;quot;existing_value_treatment&amp;quot;: &amp;quot;overwrite&amp;quot;
    },
    {
      &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,
      &amp;quot;key&amp;quot;: &amp;quot;ZEPHYR_TOOLCHAIN_VARIANT&amp;quot;,
      &amp;quot;value&amp;quot;: &amp;quot;zephyr&amp;quot;
    },
    {
      &amp;quot;type&amp;quot;: &amp;quot;relative_paths&amp;quot;,
      &amp;quot;key&amp;quot;: &amp;quot;ZEPHYR_SDK_INSTALL_DIR&amp;quot;,
      &amp;quot;values&amp;quot;: [
        &amp;quot;opt/zephyr-sdk&amp;quot;
      ],
      &amp;quot;existing_value_treatment&amp;quot;: &amp;quot;overwrite&amp;quot;
    }
  ]
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Reboot VS code and see if it is able to flash now. If not, make sure that you have &lt;a href="https://www.segger.com/downloads/jlink/"&gt;JLink&lt;/a&gt; installed and that your device is plugged in.&lt;br /&gt;&lt;br /&gt;I hope this helps!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VS Code Extension - west flash fails from missing python dependencies</title><link>https://devzone.nordicsemi.com/thread/440482?ContentTypeID=1</link><pubDate>Wed, 09 Aug 2023 11:48:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f747a87a-95ba-4451-bfe0-5dfb02710432</guid><dc:creator>Rei Vilo</dc:creator><description>&lt;p&gt;Yes, after a couple of iterations.&lt;/p&gt;
&lt;p&gt;First, I performed a&amp;nbsp;manual&amp;nbsp;installation as suggested, but it didn&amp;#39;t solve the issue.&lt;/p&gt;
&lt;p&gt;Then I launched the&amp;nbsp;automatic installation again, this time with SDK 2 4.1.&lt;/p&gt;
&lt;p&gt;Everything works fine as expected now.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VS Code Extension - west flash fails from missing python dependencies</title><link>https://devzone.nordicsemi.com/thread/440079?ContentTypeID=1</link><pubDate>Mon, 07 Aug 2023 10:39:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:728e955a-fac5-4503-9e53-58fc4abe5a08</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Did you resolve this? If not, can you check your PATH (echo $PATH)? It should use key tools (like python) from the toolchain manager, and a typical cause of issues if that is not the case (so something has modified the path).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VS Code Extension - west flash fails from missing python dependencies</title><link>https://devzone.nordicsemi.com/thread/438429?ContentTypeID=1</link><pubDate>Thu, 27 Jul 2023 07:28:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:743b49e8-f27a-48e8-ab4f-5663a50ee120</guid><dc:creator>Rei Vilo</dc:creator><description>&lt;p&gt;Thank you. I went through the manual procedure, to no avail.&lt;/p&gt;
&lt;p&gt;Sadly, the error message is not very explicit.&lt;/p&gt;
&lt;p&gt;Where should I look at?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VS Code Extension - west flash fails from missing python dependencies</title><link>https://devzone.nordicsemi.com/thread/438373?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2023 17:36:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38abcf10-1ab9-462b-b95d-d3f819958f0a</guid><dc:creator>brendansl</dc:creator><description>&lt;p&gt;I just followed their guide.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/installation/installing.html"&gt;developer.nordicsemi.com/.../installing.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VS Code Extension - west flash fails from missing python dependencies</title><link>https://devzone.nordicsemi.com/thread/438364?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2023 16:47:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3f90bfe-e882-4659-aef9-245303e98e76</guid><dc:creator>Rei Vilo</dc:creator><description>&lt;p&gt;Same problem here, with the same fatal error when completing &lt;a href="https://academy.nordicsemi.com/topic/exercise-2-1/"&gt;fund_less1_exer2&lt;/a&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;Flashing build to 601004602&lt;br /&gt;/bin/sh -c west flash -d /home/Nordic/Projects/fund_less1_exer2/build --skip-rebuild -i 601004602&lt;br /&gt;&lt;br /&gt;-- west flash: using runner jlink&lt;br /&gt;FATAL ERROR: one or more Python dependencies were missing; see the getting started guide for details on how to fix&lt;/p&gt;
&lt;p&gt;The whole configuration was installed with the recommended procedure with Toolchain Manager 1.2.5&lt;/p&gt;
&lt;p&gt;Configuration is&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Debian 6.1.38-1 (2023-07-14) x86_64 GNU/Linux&lt;/li&gt;
&lt;li&gt;VSC 1.80.1&lt;/li&gt;
&lt;li&gt;nRF Connect SDK 2.4.0&lt;/li&gt;
&lt;li&gt;Toolchain Manager 1.2.5&lt;/li&gt;
&lt;li&gt;SEGGER J-Link Commander V7.88n&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have read you have managed to fix this issue. What part of the installation should be carried manually?&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VS Code Extension - west flash fails from missing python dependencies</title><link>https://devzone.nordicsemi.com/thread/429470?ContentTypeID=1</link><pubDate>Tue, 06 Jun 2023 07:51:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec4adeff-ef24-4ac3-b16c-ae689c967071</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am glad to hear you found a solution that works for you (with manual install). I have forwarded this thread to our team that works on the toolchain manager and will update here if they have any questions or suggestions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VS Code Extension - west flash fails from missing python dependencies</title><link>https://devzone.nordicsemi.com/thread/429090?ContentTypeID=1</link><pubDate>Sat, 03 Jun 2023 01:47:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:062d30b7-4fbe-4e1c-ba29-c03132521a17</guid><dc:creator>brendansl</dc:creator><description>&lt;p&gt;I was able to get it working by doing a manual installation. I suppose the original issue is solved for me, but installing through the toolchain manager still does not work. If you would like to investigate this further, I would be more than willing to help out.&lt;/p&gt;
&lt;div class="notranslate"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VS Code Extension - west flash fails from missing python dependencies</title><link>https://devzone.nordicsemi.com/thread/429082?ContentTypeID=1</link><pubDate>Fri, 02 Jun 2023 21:49:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c525921-aad6-432b-be42-8fef5ca366a7</guid><dc:creator>brendansl</dc:creator><description>&lt;p&gt;Yes, that prints immediately when I open the terminal from the toolchain manager. Re-installing everything did not fix it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VS Code Extension - west flash fails from missing python dependencies</title><link>https://devzone.nordicsemi.com/thread/429021?ContentTypeID=1</link><pubDate>Fri, 02 Jun 2023 13:14:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5cad09c-39a3-47b2-a519-5825e2f9794f</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Is that what you get immediately printed on the terminal when you open it from the toolchain manager? Can you try to remove and re-install SDK and toolchain 2.3.0 and see if that helps?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VS Code Extension - west flash fails from missing python dependencies</title><link>https://devzone.nordicsemi.com/thread/428875?ContentTypeID=1</link><pubDate>Fri, 02 Jun 2023 02:09:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6bff1975-847b-485c-a1de-6a1b9863096d</guid><dc:creator>brendansl</dc:creator><description>&lt;p&gt;Here is the full output from opening the terminal:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/4186.terminal_5F00_output.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VS Code Extension - west flash fails from missing python dependencies</title><link>https://devzone.nordicsemi.com/thread/428864?ContentTypeID=1</link><pubDate>Thu, 01 Jun 2023 23:49:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9c75ef9-9b3d-45eb-ac90-2dbe94e94bba</guid><dc:creator>brendansl</dc:creator><description>&lt;p&gt;The toolchain is selected.&lt;/p&gt;
&lt;p&gt;Opening the terminal from the toolchain manager gives this error:&lt;/p&gt;
&lt;p&gt;Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding&lt;br /&gt;Python runtime state: core initialized&lt;br /&gt;ModuleNotFoundError: No module named &amp;#39;encodings&amp;#39;&lt;/p&gt;
&lt;p&gt;Current thread 0x00007f7d1eee61c0 (most recent call first):&lt;br /&gt; &amp;lt;no Python frame&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Building from this terminal seems to work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VS Code Extension - west flash fails from missing python dependencies</title><link>https://devzone.nordicsemi.com/thread/427841?ContentTypeID=1</link><pubDate>Fri, 26 May 2023 14:11:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:067e9a47-03c2-4b41-8a18-842fca001a83</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;If you installed via the toolchain manager you should have everything. Have you selected the toolchain from the toolchain manager in VS Code (if it did not happen automatically)? You can do that here:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1685109927643v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Also, does building from the command line work? If testing that, remember to open the command line from the toolchain manager (clicking the downwards error to the right of the &amp;quot;Open VS Code&amp;quot; button, and selecting &amp;quot;Open Terminal&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VS Code Extension - west flash fails from missing python dependencies</title><link>https://devzone.nordicsemi.com/thread/427809?ContentTypeID=1</link><pubDate>Fri, 26 May 2023 12:56:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdff3967-b41e-41c1-9336-b346e2d854c6</guid><dc:creator>brendansl</dc:creator><description>&lt;p&gt;That&amp;#39;s all the terminal output says and generating support information only says &amp;quot;Failure (code 1)&amp;quot; (along with the normal support info). Is there another log that you&amp;#39;re referring to? I used the toolchain manager to install automatically.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VS Code Extension - west flash fails from missing python dependencies</title><link>https://devzone.nordicsemi.com/thread/427779?ContentTypeID=1</link><pubDate>Fri, 26 May 2023 11:53:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0b8423c-b654-4385-a42e-1dc075833d8e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What else to you see in the log? You should be able to see what exactly is missing. That said, there is support for Ubuntu 22.04 in the toolchain manager, and I would recommend using that as that way you get everything set up out of the box (see &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/getting_started/assistant.html"&gt;installing automatically&lt;/a&gt; for details).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>