Skip to content

Auto-installing missing Python modules #795

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
janjongboom opened this issue Nov 28, 2018 · 8 comments
Closed

Auto-installing missing Python modules #795

janjongboom opened this issue Nov 28, 2018 · 8 comments

Comments

@janjongboom
Copy link
Contributor

Every time when I compile, I get:

[mbed] Auto-installing missing Python modules...

Which takes multiple seconds. Running Mbed OS 5.10, Mbed CLI 1.8.2.

@ciarmcom
Copy link
Member

Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-200

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 28, 2018

Same here

Running master as of today (noticed this even in the last patch releases), Mbed CLI 1.8.2

Why are we getting this warning?

@jeromecoutant
Copy link
Contributor

Hi

See #782
I think @janjongboom issue is the same

mbed CLI 1.8.3 is correcting this, but as tested in #782, crash can happen

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 3, 2018

So this is a duplicate. @theotherjimmy / @bridadan Shall we close this?

@jeromecoutant
Copy link
Contributor

Proposition ?

  • at first build, pip install requirements.txt is called with force update option
  • requirements file is copied into BUILD directory (to compare files for next builds)
  • pip is not called any more until the file is not changed

=> no more long "pip list" check, no more requirement parsing in script

Thx

@JanneKiiskila
Copy link
Contributor

JanneKiiskila commented Jan 31, 2019

Please fix this ASAP, it's a really annoying feature and I can only guess how much useless cycles it uses in our CIs.

2ndly, turns out this creates some kind of interesting dependency on pip version - which fails with pip 19.0.1.

3rdly - the only thing I would accept is that you add a new command, --auto-install or similar, which executes this ONLY when the user wants. Never, ever otherwise. Doing it ONCE after install should be sufficient really.

@screamerbg
Copy link
Contributor

The python modules that are required for Mbed OS tools to run are changing over time, where more and various functionalities are added, e.g. icetea, mbed_cloud_sdk, manifest tool, but also python library modules.

To satisfy these changing requirements, it's part of the user flows (not CI flows) that Mbed CLI will check whether all required modules are installed and available for the user be able to run normally the Mbed OS tools - compile, test, export, etc. Therefore this is core part of the process and we cannot install requirements ONCE.

For your CI there's already a --no-requirements command switch. In the next hour I'll put up a PR that offers a configuration switch to disable the check and installation of requirements on config levels for users like yourself who love to have control of every single module in their space.

@JanneKiiskila
Copy link
Contributor

Those changes won't come in every day or every compile. If something breaks, we should check requirements then to fix it. The default behaviour should not be we check, but rather check when asked (in my opinion).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants