Building Matter - Android Chiptool - Unexpected Python version?

Hi - Encountered "Unexpected Python version: Python 3.10.6" when doing a build of Matter as instructed here:

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.2/matter/BUILDING.html

I am using the matter library that was installed with the NRF Connect SDK (using NRF Connect for desktop) that is located in:

/opt/nordic/ncs/v2.0.2/modules/lib/matter

When I run 

source scripts/bootstrap.sh

I get the error: "Unexpected Python version: Python 3.10.6"

This only started happening when I updated openssl and pkg-config as instructed: brew install openssl pkg-config

It was working fine previously, but I imagine this will affect anyone else doing a clean build/install.

My OS: MacOS 12.4 on M1 Max.

If I force brew to unlink [email protected] and link [email protected] instead, I get the failure below.

$ source scripts/bootstrap.sh 

  WELCOME TO...

           ░▓░
           ▓█▓
           ▓█▓                                                     ▒█     ▒█
      ▒██▒▒▓██▒███▒                ░▒▓▒░  ░▒▓▒░       ░░▓█▒░ ░█  █████████████░    ░▒█▒░       ░░▒░
       ░▓█████▓██░               ▒█▒░░▒▓██▓▒░░▒█▒   ░█▓▒░░▒████    █▓░    █▓░    ▒█▒░░░▒█▓░   ██▒░░
    ▒█▒░         ░██▒           ░█░     █▓     ░█░ ░▓▒      ░▓█    █▓     █▓    ▒█░░    ░██  ▒▓
    ░▓██▓░     ░██▓█░           ░█      ▓█      █░ ░█░       ██    █▓     █▓    ▓██████████  ▒█
     ░▓███▒   ▒███▒░            ░█      ▓█      █░  ██░    ░███    █▓     █▓    ░█▒░         ▒█
 ░▒████████░ ░███▓▓█▓▓▒         ░█      ▒▒      █░   ░█▓██▓█░▒█    ░▓▓█░  ░▓▓█░   ▒▓▓██▓█░   ▒▓
 ░██▒░  ▒██▒ ▒██░  ░▒█▓
         ░▓░ ░▓░

  BOOTSTRAP! Bootstrap may take a few minutes; please be patient.

Downloading and installing packages into local source directory:

  Setting up CIPD package manager...done (2.6s)
  Setting up Python environment.....done (4.4s)
  Setting up pw packages............skipped (0.1s)
  Setting up Host tools.............done (0.1s)

Activating environment (setting environment variables):

  Setting environment variables for CIPD package manager...done
  Setting environment variables for Python environment.....done
  Setting environment variables for pw packages............skipped
  Setting environment variables for Host tools.............done

Checking the environment:

-bash: pw: command not found
Error during bootstrap--see messages above.

Welcome your guidance and advice. Thanks! 


 
Parents
  • I ended up removing the v2.0.2 installation and doing a clean install from NRF Connect desktop app and then I was able to build matter and the Android Chiptool. This took a long time so if there is any insight into what the problem was and how to avoid or solve it differently, it would still be welcome. Thanks!

  • Hi,

    Good to hear that you managed to solve it! 

    You should not have to rebuild the Matter libraries, as they are already built in nRF Connect SDK.

    I have seen issues caused by Python 3.10 when people have multiple versions of Python installed before. Unlinking as you did or changing the order in path usually works. I do not know why pw package is not installed correctly, but a possible solution might be to install it manually and then run source scripts/bootstrap.sh again.

    Best regards,

    Marte

Reply
  • Hi,

    Good to hear that you managed to solve it! 

    You should not have to rebuild the Matter libraries, as they are already built in nRF Connect SDK.

    I have seen issues caused by Python 3.10 when people have multiple versions of Python installed before. Unlinking as you did or changing the order in path usually works. I do not know why pw package is not installed correctly, but a possible solution might be to install it manually and then run source scripts/bootstrap.sh again.

    Best regards,

    Marte

Children
Related