mbed-cli: CLI fails to compile

Hi, CLI fails to compile, environement is OSX 10.11.6, I tried to update CLI, it did nothing and still fail. Last time i used CLI few month ago it was working.

$ sudo -H pip install -U mbed-cli
Requirement already up-to-date: mbed-cli in /usr/local/lib/python2.7/site-packages (1.8.2)

$ mbed compile -m NUCLEO_L432KC -t GCC_ARM
[mbed] ERROR: Unknown Error: 'module' object has no attribute 'get_installed_distributions'

Reverting to PIP 9.0.3 did not fix the problem:

$ pip install -U pip==9.0.3
Collecting pip==9.0.3
  Downloading https://files.pythonhosted.org/packages/ac/95/a05b56bb975efa78d3557efa36acaf9cf5d2fd0ee0062060493687432e03/pip-9.0.3-py2.py3-none-any.whl (1.4MB)
    100% |████████████████████████████████| 1.4MB 908kB/s 
Installing collected packages: pip
  Found existing installation: pip 18.0
    Uninstalling pip-18.0:
      Successfully uninstalled pip-18.0
Successfully installed pip-9.0.3

$ mbed compile -m NUCLEO_L432KC -t GCC_ARM
[mbed] ERROR: Unknown Error: 'module' object has no attribute 'get_installed_distributions'

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 27 (9 by maintainers)

Most upvoted comments

You might notice that mbed --version is very different to the mbed-cli version reported in pip listm (1.2.2 vs 1.8.2). This means that you either have 2 versions of python installed, or that you have virtual env enabled and effectively you’re called the old mbed-cli version.

Could you try to remove mbed-cli using pip uninstall mbed-cli and see whether running command mbed --version still gives any output? If it does, you might have to chase where is this mbed-cli installed, e.g. this should help you find which python is called:

cat `which mbed`