Mbed-cli breaks PIP environment by installing/updating packages without user's consent
See original GitHub issuembed-cli install pip packages and by doing so might break current environment.
$ pip install -U jsonschema==2.4.0
$ pip list |grep jsonschema
jsonschema 2.4.0
$ mbed compile --config
[mbed] Auto-installing missing Python modules...
...
$ pip list |grep jsonschema
jsonschema 2.6.0
Installing Pip packages might have unwanted side effect and should not be done if user is not requesting that. Such feature should be removed from mbed-cli
This blocks Icetea testing on my Mac.
Example:
$ icetea --version
1.0.1
# Run any mbed command
$ mbed compile --config >/dev/null
$ icetea --version
Traceback (most recent call last):
File "/usr/local/bin/icetea", line 11, in <module>
sys.exit(icetea_main())
File "/usr/local/lib/python2.7/site-packages/icetea_lib/main.py", line 22, in icetea_main
returnCode = manager.run()
File "/usr/local/lib/python2.7/site-packages/icetea_lib/IceteaManager.py", line 219, in run
version = get_fw_version()
File "/usr/local/lib/python2.7/site-packages/icetea_lib/tools/tools.py", line 51, in get_fw_version
pkg = require(get_fw_name())[0]
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 892, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 783, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (jsonschema 2.6.0 (/usr/local/lib/python2.7/site-packages), Requirement.parse('jsonschema<=2.4.0'), set(['jsonmerge']))
Conclusion
Running any Mbed command breaks Icetea
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Not installing correclty on Ubuntu 16 · Issue #364 - GitHub
Problem On Ubuntu 16 you can install mbed-cli from pip, but then mbed-cli is not recognized by the system as a valid command....
Read more >Install or upgrade - Build tools | Mbed OS 6 Documentation
Install or upgrade. Mbed CLI 2 is a Python package called mbed-tools , so you can install it with pip. Tip: We recommend...
Read more >Install and set up - Build tools | Mbed OS 6 Documentation
To verify Mbed CLI installed correctly, run mbed --help . To update Mbed CLI, run: python3 -m pip install -U mbed-cli. 3. Install...
Read more >How does one update the mbed CLI to the latest version?
I'm running the mbed CLI on a Linux PC. Currently, I have mbed CLI version 0.9.1 installed. The latest version on the GitHub/mbed-cli...
Read more >Troubleshoot - Build tools | Mbed OS 6 Documentation
Mbed CLI attempts to automatically install missing Python dependencies. If Mbed CLI doesn't have the necessary permissions, installation fails and Mbed CLI ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I would prefer opposite to be the default.
If I don’t ask it to install packages, it should not. So default should be
false
and only if--install-requirements
would have been given, it could do so.This would allow me to work with virtual environments, where I can be certain that running
mbed build
does not ruin my installation.And version collisions are for Icetea+Mbed OS teams to fix, should not be handled in this issue.
@SeppoTakalo Does the switch
--no-requirements
resolve this? or would you need something more?