Skip to content
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

idf.py: command not found (IDFGH-5791) #7499

Closed
3 tasks
mianqi2016 opened this issue Sep 1, 2021 · 6 comments
Closed
3 tasks

idf.py: command not found (IDFGH-5791) #7499

mianqi2016 opened this issue Sep 1, 2021 · 6 comments
Labels
Resolution: Won't Do This will not be worked on Status: Done Issue is done internally

Comments

@mianqi2016
Copy link

----------------------------- Delete below -----------------------------

----------------------------- Delete above -----------------------------

Environment

  • Development Kit: [安信可ESP32-Audio-Kit音频开发板]
  • Module or chip used: [ESP32-A1S]
  • IDF version (run git describe --tags to find it):esp-idf-v4.3
  • Build System: [CMake|idf.py]
  • Compiler version (xtensa-esp32-elf-gcc --version: command not found)
  • Operating System: [Ubuntu 20.04]
  • Using an IDE?: [Yes (eclipse 2020-12)]
  • Power Supply: [USB]

Problem Description

//The board I tried was a demo board for Audio AI based on ESP32-A1S, since I found the software env was difficult to be setup, so I decided to try a lower step first - esp-idf, then step up to esp-adf.

I installed esp-idf as it was told here(https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html#get-started-get-prerequisites), but there were to many
"Failed to clone Retry scheduled
fatal:unable to access
gnutls_handshake() failed:", even when I tried in a some internet free time(half past 7 AM), so I thought to try eclipse with esp-idf Plugin.

I installed esp-idf plug-in and tools in eclipse,and tried the example "hellow_world", the button "Build the configurations of selected projects" was disable, while the button "Build All" was OK, I clicked "Build All" no error prompted, and I click "Run", it prompted "Serial port not found", so I think I should use "idf.py menuconfig", but when I typed "idf.py menuconfig" into terminal, it prompted "idf.py: command not found", although I could see "idf.py" in my "tools" directory and I have added both IED_PATH and idf.py PATH into .profile as it was told here(https://docs.espressif.com/projects/esp-idf/en/release-v3.3/get-started-cmake/add-idf_path-to-profile.html) , I verified it by "echo $PATH".

Then I tried "cmake", while when I typed "cmake menuconfig", it was prompted:"The source directory "/home/mq/menuconfig" does not exist."

Expected Behavior

I expect the menuconfig interface would shown, and I could config the serial port "ttyUSB0".

Actual Behavior

when typed"idf.py menuconfig", it was prompted:
"idf.py: command not found"

when typed "cmake menuconfig", it was prompted:
"The source directory "/home/mq/menuconfig" does not exist."
""

Steps to reproduce

  1. step1
  2. ...

// If possible, attach a picture of your setup/wiring here.
x-special/nautilus-clipboard
copy
file:///home/mq/Pictures/Screenshot%20from%202021-09-01%2007-29-40.png

the screenshot is also here - https://ibb.co/wYNkgtW

Code to reproduce this issue

// the code should be wrapped in the ```cpp tag so that it will be displayed better.
#include "esp_log.h"

void app_main()
{

}

// If your code is longer than 30 lines, GIST is preferred.

Debug Logs

Debug log goes here, should contain the backtrace, as well as the reset source if it is a crash.
Please copy the plain text here for us to search the error log. Or attach the complete logs but leave the main part here if the log is *too* long.

Other items if possible

  • sdkconfig file (attach the sdkconfig file from your project folder)
  • elf file in the build folder (note this may contain all the code details and symbols of your project.)
  • coredump (This provides stacks of tasks.)
@espressif-bot espressif-bot added the Status: Opened Issue is new label Sep 1, 2021
@github-actions github-actions bot changed the title idf.py: command not found idf.py: command not found (IDFGH-5791) Sep 1, 2021
@dobairoland
Copy link
Collaborator

Hi @mianqi2016.

First of all, you are browsing the documentation for the master (v4.4) branch. This is the right page for your version:
https://docs.espressif.com/projects/esp-idf/en/release-v4.3/esp32/get-started/index.html#step-1-install-prerequisites
(different versions of ESP-IDF could have very different prerequisites)

Please don't update your PATH. The documentation page is for old version of ESP-IDF (v3.3). The . export.sh command outlined in the getting started guide should set your PATH. This way it won't be permanent and your global PATH won't be affected.

After you completed the steps of the getting started guide and run . export.sh, you should be able to run for example idf.py --version.

If you completed that successfully, you can move to the Eclipse setup guide: https://github.com/espressif/idf-eclipse-plugin#installing-esp-idf and use the "To configure an existing ESP-IDF" step from the guide.

@mianqi2016
Copy link
Author

I tried this:https://docs.espressif.com/projects/esp-idf/en/release-v4.3/esp32/get-started/index.html#step-1-install-prerequisites
it was failed, how can I install it in eclipse, I found use eclipse plugin more realistic。
https://ibb.co/yPh2NYG
https://ibb.co/Mgqrz2d

@dobairoland
Copy link
Collaborator

Those messages are because of poor Internet connection. You can either retry many times or can download a ZIP-ed environment from the https://github.com/espressif/esp-idf/releases page, for example
https://github.com/espressif/esp-idf/releases/download/v4.3/esp-idf-v4.3.zip.

@mianqi2016
Copy link
Author

I saw lots of "Retry scheduled", will they be retried by the software automatically in the background, or should I manually retry by "git clone ..." again and again?

@dobairoland
Copy link
Collaborator

I saw lots of "Retry scheduled", will they be retried by the software automatically in the background,

No, it won't be.

or should I manually retry by "git clone ..." again and again?

I'm not sure if that would ever be successful. I would suggest to download the ZIP or contact the company directly for an alternative way of getting ESP-IDF.

@espressif-bot espressif-bot added Resolution: Won't Do This will not be worked on Status: Done Issue is done internally and removed Status: Opened Issue is new labels Sep 2, 2021
@Benedito821
Copy link

I am facing similar problem on windows 11. When I try to run the example advanced_https_ota idf.py command is not found. On another hand idf.py runs properly when I use the blink example. I tried to run the export.bat file to set the env variables automatically but without any effect. Any tip @dobairoland ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Won't Do This will not be worked on Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

4 participants