6 years, 10 months ago.

Auto-installing missing Python modules... but modules are already installed

I just installed 1.3.0 on a LINUX system

I downloaded the mbed-os-example-blinky

When I try to use it, as an example

mbed detect

it responds

[mbed] Auto-installing missing Python modules...
[mbed] WARNING: Unable to auto-install required Python modules.
---
[mbed] WARNING: -----------------------------------------------------------------
[mbed] WARNING: The mbed OS tools in this program require the following Python modules: colorama, pyserial, requests
[mbed] WARNING: You can install all missing modules by running "pip install -r requirements.txt" in "/home/maris/MBED-ARM/mbed-os-example-blinky/mbed-os"
[mbed] WARNING: On Posix systems (Linux, Mac, etc) you might have to switch to superuser account or use "sudo"
---

I tried to install it more times but the result was:

>sudo pip install -r requirements.txt 
Downloading/unpacking colorama>=0.3.3 (from -r requirements.txt (line 1))
  Downloading colorama-0.3.9-py2.py3-none-any.whl
Downloading/unpacking PySerial>=2.7 (from -r requirements.txt (line 2))
  Downloading pyserial-3.4-py2.py3-none-any.whl (193kB): 193kB downloaded
Requirement already satisfied (use --upgrade to upgrade): PrettyTable>=0.7.2 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.7.3 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 4))
Requirement already satisfied (use --upgrade to upgrade): IntelHex>=1.3 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 5))
Requirement already satisfied (use --upgrade to upgrade): junit-xml in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 6))
Requirement already satisfied (use --upgrade to upgrade): pyYAML in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 7))
Requirement already satisfied (use --upgrade to upgrade): requests in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 8))
Requirement already satisfied (use --upgrade to upgrade): mbed-ls>=0.2.13 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 9))
Requirement already satisfied (use --upgrade to upgrade): mbed-host-tests>=1.1.2 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 10))
Requirement already satisfied (use --upgrade to upgrade): mbed-greentea>=0.2.24 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 11))
Requirement already satisfied (use --upgrade to upgrade): beautifulsoup4>=4 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 12))
Requirement already satisfied (use --upgrade to upgrade): fuzzywuzzy>=0.11 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 13))
Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python2.7/dist-packages (from junit-xml->-r requirements.txt (line 6))
Requirement already satisfied (use --upgrade to upgrade): fasteners in /usr/local/lib/python2.7/dist-packages (from mbed-ls>=0.2.13->-r requirements.txt (line 9))
Requirement already satisfied (use --upgrade to upgrade): appdirs>=1.4 in /usr/local/lib/python2.7/dist-packages (from mbed-ls>=0.2.13->-r requirements.txt (line 9))
Requirement already satisfied (use --upgrade to upgrade): pyOCD>=0.8.1a1 in /usr/local/lib/python2.7/dist-packages (from mbed-host-tests>=1.1.2->-r requirements.txt (line 10))
Requirement already satisfied (use --upgrade to upgrade): lockfile in /usr/lib/python2.7/dist-packages (from mbed-greentea>=0.2.24->-r requirements.txt (line 11))
Requirement already satisfied (use --upgrade to upgrade): mock in /usr/local/lib/python2.7/dist-packages (from mbed-greentea>=0.2.24->-r requirements.txt (line 11))
Requirement already satisfied (use --upgrade to upgrade): enum34 in /usr/local/lib/python2.7/dist-packages (from pyOCD>=0.8.1a1->mbed-host-tests>=1.1.2->-r requirements.txt (line 10))
Requirement already satisfied (use --upgrade to upgrade): future in /usr/local/lib/python2.7/dist-packages (from pyOCD>=0.8.1a1->mbed-host-tests>=1.1.2->-r requirements.txt (line 10))
Requirement already satisfied (use --upgrade to upgrade): websocket-client in /usr/local/lib/python2.7/dist-packages (from pyOCD>=0.8.1a1->mbed-host-tests>=1.1.2->-r requirements.txt (line 10))
Requirement already satisfied (use --upgrade to upgrade): pyusb>=1.0.0b2 in /usr/local/lib/python2.7/dist-packages (from pyOCD>=0.8.1a1->mbed-host-tests>=1.1.2->-r requirements.txt (line 10))
Installing collected packages: colorama, PySerial
  Found existing installation: colorama 0.2.5
    Not uninstalling colorama at /usr/lib/python2.7/dist-packages, owned by OS
  Found existing installation: pyserial 2.6
    Not uninstalling pyserial at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed colorama PySerial
Cleaning up...

do you have any suggestion? Many Thanks M. Maris

1 Answer

6 years, 10 months ago.

It seems your system has a version of colorama and PySerial installed that doesn't match the versions needed by mbed tools. You can run the command with upgrade but not knowing what other part of your operating environment installed these, there might be a version conflict and pip doesn't handle this well unless you work in virtual environments.

If you try with upgrade, this should satisfy the mbed tools needs but could bork another program or set of tools that installed these specific versions.

>sudo pip install -U -r requirements.txt

Accepted Answer

Hi Sam I tried to use the -U option and it seems worked well, but the error remains. I tried on a differernt machine with a more recent version of Linux and the problem is no more present. Thanks Mic

posted by Michele Maris 11 Jan 2018