ARMmbed / mbed-cli

Arm Mbed Command Line Interface
https://os.mbed.com
Apache License 2.0
333 stars 176 forks source link

Missing python modules #116

Closed toyowata closed 8 years ago

toyowata commented 8 years ago

setup.py should install colorama and jinja2 python modules, otherwise I got script errors.

screamerbg commented 8 years ago

This is needed for the build system. Not mbed CLI itself.

@geky any progress with the python venv?

0xc0170 commented 8 years ago

This is needed for the build system. Not mbed CLI itself.

This module uses mbed-os/tools that have requirements. Are tools going to be separate python module or they stay as part of mbed-os distribution?

PrzemekWirkus commented 8 years ago

This has to be fined in setup.py from mbed-cli. This is why:

In new virtual environment:

$ git clone <mbed-cli>
$ cd mbed-cli
$ sudo python setup.py install
$ cd ..
$ neo new test_app
$ cd test_app
$ neo compile
[WARNING] Using default settings. Define your settings in the file "./mbed_settings.py"
Traceback (most recent call last):
  File "/home/przemek/tmp/venv4/cctest/mbed-os/tools/make.py", line 43, in <module>
    from tools.build_api import build_project
  File "/home/przemek/tmp/venv4/cctest/mbed-os/tools/build_api.py", line 20, in <module>
    import colorama
ImportError: No module named colorama
[mbed ERROR] Subrocess exit with error code 1
---

Solution is to:

$ sudo pip install colorama
$ sudo pip install jinja2
screamerbg commented 8 years ago

Addressed in PR #119

screamerbg commented 8 years ago

PR #119 now accepted and missing Python modules are reported, e.g.

[mbed WARNING] The mbed build tools in this program require Python modules that are not installed.
[mbed WARNING] This might prevent you from compiling your code or exporting to IDEs and other toolchains.
[mbed WARNING] The missing Python modules are: pyserial, prettytable, Jinja2, IntelHex, mbed-ls
[mbed WARNING] You can install all missing modules by opening a command prompt in "/Users/mihsto01/Work/temp/mbed-Client-Morpheus-from-source/mbed-os" and running "pip install -r requirements.txt"