Runtime Error while installing nRF Connect SDK in Ubuntu

Hi Team,

I'm installing nRF connect SDK in my PC and i'm using ubuntu for Zephyr RTOS.

When i'm run this command that time error is coming  "west init -m https://github.com/nrfconnect/sdk-nrf --mr main".

Runtime error:-

Traceback (most recent call last):
File "/home/dev/.local/bin/west", line 8, in <module>
sys.exit(main())
File "/home/dev/.local/lib/python3.10/site-packages/west/app/main.py", line 786, in main
app.run(argv or sys.argv[1:])
File "/home/dev/.local/lib/python3.10/site-packages/west/app/main.py", line 101, in run
self.load_manifest()
File "/home/dev/.local/lib/python3.10/site-packages/west/app/main.py", line 119, in load_manifest
self.manifest = Manifest.from_topdir(topdir=self.topdir,
File "/home/dev/.local/lib/python3.10/site-packages/west/manifest.py", line 1105, in from_topdir
return Manifest(topdir=topdir, config=config,
File "/home/dev/.local/lib/python3.10/site-packages/west/manifest.py", line 1373, in __init__
self._ctx = self._top_level_init(source_data,
File "/home/dev/.local/lib/python3.10/site-packages/west/manifest.py", line 1715, in _top_level_init
manifest_path_option = get_option('manifest.path')
File "/home/dev/.local/lib/python3.10/site-packages/west/manifest.py", line 1712, in get_option
return config.get(option, default=default,
File "/home/dev/.local/lib/python3.10/site-packages/west/configuration.py", line 169, in get
return self._get(lambda cf: cf.get(option), default, configfile)
File "/home/dev/.local/lib/python3.10/site-packages/west/configuration.py", line 208, in _get
for cf in self._whence(configfile):
File "/home/dev/.local/lib/python3.10/site-packages/west/configuration.py", line 229, in _whence
raise RuntimeError('local configuration file not found')
RuntimeError: local configuration file not found

I don't know why it's coming. And I missed any steps or not? If anyone know about this type of error then guide me to sort out this que.

Thank you,  

Parents
  • Hi,

    1. Can you run the following commands in a terminal to check for dependencies according to step 1 in the installation guide and tell me what they return?
      cmake --version
      python3 --version
      dtc --version


    2. Can you run "west --version" in a terminal window and tell me what it return?
    3. Can you run the following command in a terminal window to see if everything is added to path:
       
      echo $PATH

    The issue is most likely with some dependency. This ticket might also be of help

    Please let me know about your progress,

    Kind regards,
    Andreas

  • Hi AHaug,

    Can you run the following commands in a terminal to check for dependencies according to step 1 in the installation guide and tell me what they return?

    1. dev@manthan:~$ cmake --version
        cmake version 3.22.5

    CMake suite maintained and supported by Kitware (kitware.com/cmake).

    2. dev@manthan:~$ python3 --version
        Python 3.10.4

    3.  dev@manthan:~$ dtc --version
         Version: DTC 1.6.1

    This return and for another 

    • Can you run "west --version" in a terminal window and tell me what it return?

    dev@manthan:~$ west --version
    Traceback (most recent call last):
    File "/home/dev/.local/bin/west", line 8, in <module>
    sys.exit(main())
    File "/home/dev/.local/lib/python3.10/site-packages/west/app/main.py", line 786, in main
    app.run(argv or sys.argv[1:])
    File "/home/dev/.local/lib/python3.10/site-packages/west/app/main.py", line 101, in run
    self.load_manifest()
    File "/home/dev/.local/lib/python3.10/site-packages/west/app/main.py", line 119, in load_manifest
    self.manifest = Manifest.from_topdir(topdir=self.topdir,
    File "/home/dev/.local/lib/python3.10/site-packages/west/manifest.py", line 1105, in from_topdir
    return Manifest(topdir=topdir, config=config,
    File "/home/dev/.local/lib/python3.10/site-packages/west/manifest.py", line 1373, in __init__
    self._ctx = self._top_level_init(source_data,
    File "/home/dev/.local/lib/python3.10/site-packages/west/manifest.py", line 1715, in _top_level_init
    manifest_path_option = get_option('manifest.path')
    File "/home/dev/.local/lib/python3.10/site-packages/west/manifest.py", line 1712, in get_option
    return config.get(option, default=default,
    File "/home/dev/.local/lib/python3.10/site-packages/west/configuration.py", line 169, in get
    return self._get(lambda cf: cf.get(option), default, configfile)
    File "/home/dev/.local/lib/python3.10/site-packages/west/configuration.py", line 208, in _get
    for cf in self._whence(configfile):
    File "/home/dev/.local/lib/python3.10/site-packages/west/configuration.py", line 229, in _whence
    raise RuntimeError('local configuration file not found')
    RuntimeError: local configuration file not found

    Can you run the following command in a terminal window to see if everything is added to path:

    dev@manthan:~$ echo $PATH
    /home/dev/.local/bin:/home/dev/gn:/home/dev/gn:/home/dev/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin

    above what i give that i got return when i run whatever give commands.

    In second reply what does mean of this line "RuntimeError: local configuration file not found"  ?

    Thank you,

  • It seems like west is not installed properly. Can you try to uninstall and reinstall west?

    pip3 uninstall west
    
    pip3 install --user west
    

    Then see if west is installed with 

    west --version
    

    If this returns something similar to:

     

    Then you can move on to step 3 in the installation guide. If you get the message "west is already initialized" in the folder you try to set up your version of NCS, then you either have to remove the .west folder located where you ran "west init -m https://github.com/nrfconnect/sdk-nrf --mr main" or install it elsewhere.

    Let me know if this fixes things for you.

    Kind regards,
    Andreas

  • hi AHaug, 

    I have tried what you said in above tickets. In that i uninstalled west and again installed west , after that i run "west --version" command again i got same error(runtime error).

    If i clear this error then only i can go step 3. But i'm stuck on step 2 only.

    Thank you,

  • Hi, 

    EDIT: Try re-installing west using --no-cache-dir flag in pip to avoid using cached possibly broken version: "pip3 install --user west --no-cache-dir" when reinstalling west

    Let me know if this fixes your issues!

    Kind regards,
    Andreas

  • Hi,

    i have tried but still i'm getting same error and I'll share my screenshot to you. Can you check and suggest me where i'm doing mistake?

    And tried to check in my system how many application are installed using "dpkg --get-selections | awk '{print $1}' "

    this command, But there is not showing "west". I don't know how/why it's happening in my PC?

    Thank you,

    1. Which command did you use to uninstall west?
    2. Did you try the solution in the ticket I linked earlier https://github.com/zephyrproject-rtos/west/issues/576? West tries to read ~/.west/config even with a failed installation so you need to remove the .west folder as well

    For 2) Try the following:

    1. Navigate to the folder you tried to initialize the SDK:
    2. If you don't see the .west folder, press ctrl+H
    3. Remove the .west folder (and everything else that is in the folder you have) either by opening a terminal and removing it with a command or delete the foldercd ~
    4. pip3 uninstall west
    5. west --version
      1. This should return something like "west is not recognized"
    6. pip3 install --user west --pip3 install --user west - -no-cache-dir
    7. west --version
      1. This should not give the error you are describing
    8. Move on to step 3 if everything is ok

    If you get any new errors, please add them in text form (insert -> code -> text)

    Let me know about your progress!

    Kind regards,
    Andreas

Reply
    1. Which command did you use to uninstall west?
    2. Did you try the solution in the ticket I linked earlier https://github.com/zephyrproject-rtos/west/issues/576? West tries to read ~/.west/config even with a failed installation so you need to remove the .west folder as well

    For 2) Try the following:

    1. Navigate to the folder you tried to initialize the SDK:
    2. If you don't see the .west folder, press ctrl+H
    3. Remove the .west folder (and everything else that is in the folder you have) either by opening a terminal and removing it with a command or delete the foldercd ~
    4. pip3 uninstall west
    5. west --version
      1. This should return something like "west is not recognized"
    6. pip3 install --user west --pip3 install --user west - -no-cache-dir
    7. west --version
      1. This should not give the error you are describing
    8. Move on to step 3 if everything is ok

    If you get any new errors, please add them in text form (insert -> code -> text)

    Let me know about your progress!

    Kind regards,
    Andreas

Children
Related