Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
5 years, 9 months ago.
MBED CLI issue [mbed] WARNING: Cannot find the mbed tools directory in ...
I'm having issues with using the mbed-cli. I'm getting the WARNING/ERROR as shown below. I'm running the latest version of mbed-cli on Win 10. I used to be able to run mbed-cli without any issue like this. I've tried starting in a clean directory. I don't show it below, but I've tried using mbed remove/add/deploy, etc. They all give the shame general message. Can someone point me to a solution?
Update: I think I've tracked the issue. I was trying to follow the Mbed CLI documentation regarding "Managing multiple Mbed Projects" under https://os.mbed.com/docs/mbed-os/v5.11/tools/working-with-mbed-cli.html. I used "mbed config -G MBED_OS_DIR .../mbed-os" for my project. Apparently, I set this variable to an invalid path. After confirming the correct path, it seems to work OK with mbed-os-example-blinky. I need to do further tests to see if I can get it to work as described in the docs.
Suggestion: To prevent this kind of issue, the mbed CLI warning/error message could recommend that the user verify that MBED_OS_DIR is set correctly.
$ mbed import https://github.com/ARMmbed/mbed-os-example-blinky.git
[mbed] WARNING: If you're using Python 3 with Mbed OS 5.8 and earlier versions, Python errors will occur when compiling, testing and exporting
[mbed] WARNING: Cannot find the mbed tools directory in "D:\Shared\EmbeddedSytems\mbedDev\Projects\mbed-os-example-blinky"
[mbed] Working path "D:\Shared\EmbeddedSytems\mbedDev\Projects" (directory)
[mbed] Importing program "mbed-os-example-blinky" from "https://github.com/ARMmbed/mbed-os-example-blinky" at latest revision in the current branch
[mbed] Adding library "mbed-os" from "https://github.com/ARMmbed/mbed-os" at rev #51d55508e840
$ mbed compile
[mbed] WARNING: If you're using Python 3 with Mbed OS 5.8 and earlier versions, Python errors will occur when compiling, testing and exporting
[mbed] ERROR: The mbed tools were not found in "D:\Shared\EmbeddedSytems\mbedDev\Projects\mbed-os-example-blinky". You can run "mbed deploy" to install dependencies and tools.
[mbed] WARNING: Using Python 3 with Mbed OS 5.8 and earlier can cause errors with compiling, testing and exporting
[mbed] Working path "D:\Shared\EmbeddedSytems\mbedDev\Projects\mbed-os-example-blinky" (program)
$ mbed deploy
[mbed] WARNING: If you're using Python 3 with Mbed OS 5.8 and earlier versions, Python errors will occur when compiling, testing and exporting
[mbed] WARNING: Cannot find the mbed tools directory in "D:\Shared\EmbeddedSytems\mbedDev\Projects\mbed-os-example-blinky"
[mbed] Working path "D:\Shared\EmbeddedSytems\mbedDev\Projects\mbed-os-example-blinky" (program)
[mbed] Updating library "mbed-os" to rev #51d55508e840 (tag: mbed-os-5.11.5)