Python issues and suggested updates

leenowell
Posts: 92
Joined: Tue Jan 15, 2019 1:50 pm

Python issues and suggested updates

Postby leenowell » Sun Feb 16, 2020 4:48 pm

Hi,

I have rebuilt my laptop and done a clean install of idf and the eclipse plugin. I have a couple of questions / observations
1. The Eclipse plugin seems to require python v3.7 which on my system (Ubuntu 19.10) is installed as python3 as opposed to python. In the install tools section I can point it at the correct one in the config box that pops up. Is this correct?
2. Reason for question 1 is that although the plugin refers to just cloning the idf repo, I had some errors which implies I need to have done the full install process for IDF (e.g. running install.sh). Now this has a dependency on python which would be version 2.7. So as far as I can tell in the install the tools will use v2.7 but in Eclipse it will build using 3.7? Is this correct?
3. If I am on the right track, I think the eclipse readme needs updating to be clearer on what IDF prerequisites are required. Linking to the right places in the docs would be helpful I guess.
EDIT added 4
4. The prerequisites from the IDF install gives a ubuntu line to install the dependencies. This installed python v2.7. The install,sh script raises errors saying that v2.7 is now end of life.

Thanks

Lee.

ESP_kondalkolipaka
Posts: 188
Joined: Wed Jul 17, 2019 5:26 pm

Re: Python issues and suggested updates

Postby ESP_kondalkolipaka » Tue Feb 18, 2020 8:15 am

1. During the "install tools" action, you can select any python3 version and that should work, needn't be expactly 3.7. That's basically used to run "idf.py install all" command from the eclipse. This version will not be used for further actions like build, flash, etc.
2. "install tools" action also install the required python version for the selected esp-idf and added to the CDT build environment. You can check "IDF_PYTHON_ENV_PATH" in eclipse build environemnt preferences page. This will be used during the project build.
3. If you're working with eclipse, no needn't run install.sh. "Install tools" will take care of installing the required tools, dependencies and configuring the CDT build environment variables.

Thanks for pointing the gaps in the documentation, we will improve on this.

leenowell
Posts: 92
Joined: Tue Jan 15, 2019 1:50 pm

Re: Python issues and suggested updates

Postby leenowell » Tue Feb 18, 2020 8:28 am

Thanks for getting back to me. For me, install tools in eclipse did not work on its own. I seem to recall the issue was when I clean generated IDF app, it came up with python dependencies issues but rather than the ones I had seen before where it says the dependency it only had python. I concluded that it was therefore still dependent on python (as opposed to python3 I had told it to use in install tools.). Running install.sh fixed the issue I assume by installing python v2.x.

If it is supposed to work as you mention below then I suspect there is somewhere in the eclipse environment which is not using the python specified in the install tools. If you can tell me how best to clean my environment back to clean build I am happy to redo the steps to help.

Who is online

Users browsing this forum: No registered users and 16 guests