esp-idf-tools-setup-2.2.exe Installation has failed with exit code 1

User avatar
gerrikoio
Posts: 8
Joined: Fri Sep 28, 2018 9:41 am

Re: esp-idf-tools-setup-2.2.exe Installation has failed with exit code 1

Postby gerrikoio » Fri Feb 28, 2020 5:50 pm

I've just downloaded the tool from the website and I am getting this error message.

I'm using a Windows10 64bit laptop

User avatar
gerrikoio
Posts: 8
Joined: Fri Sep 28, 2018 9:41 am

Re: esp-idf-tools-setup-2.2.exe Installation has failed with exit code 1

Postby gerrikoio » Sat Feb 29, 2020 12:39 pm

I have attempted quite a few times now.

The error log appears fairly consistent no matter how many different Python versions and path options I try.

Snippet of error log included. Logs prior to this stage all show correct execution.

Code: Select all


2020-02-29 12:28:24.360   --------
2020-02-29 12:28:24.360   Installing Python environment:C:\Users\RR\AppData\Local\Programs\Python\Python37\python.exe C:\Users\RR\esp-idf\tools\idf_tools.py install-python-env
2020-02-29 12:28:25.360   Done, exit code=1
2020-02-29 12:28:25.360   --------
2020-02-29 12:28:25.360   Running command: C:\Users\RR\AppData\Local\Programs\Python\Python37\python.exe C:\Users\RR\esp-idf\tools\idf_tools.py install-python-env
                          usage: virtualenv [--version] [--with-traceback] [-v | -q] [--app-data APP_DATA] [--clear-app-data] [--discovery {builtin}] [-p py] [--creator {builtin,cpython3-win,venv}] [--seeder {app-data,pip}] [--no-seed] [--activators comma_sep_list]
                                            [--clear] [--system-site-packages] [--copies] [--download | --no-download] [--extra-search-dir d [d ...]] [--pip version] [--setuptools version] [--wheel version] [--no-pip] [--no-setuptools] [--no-wheel]
                                            [--symlink-app-data] [--prompt prompt] [-h]
                                            dest
                          virtualenv: error: unrecognized arguments: --no-site-packages
                          Creating a new Python environment in C:\Users\RR\.espressif\python_env\idf4.0_py3.7_env
                          Traceback (most recent call last):
                            File "C:\Users\RR\esp-idf\tools\idf_tools.py", line 1372, in <module>
                              main(sys.argv[1:])
                            File "C:\Users\RR\esp-idf\tools\idf_tools.py", line 1368, in main
                              action_func(args)
                            File "C:\Users\RR\esp-idf\tools\idf_tools.py", line 1184, in action_install_python_env
                              stdout=sys.stdout, stderr=sys.stderr)
                            File "C:\Users\RR\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 363, in check_call
                              raise CalledProcessError(retcode, cmd)
                          subprocess.CalledProcessError: Command '['C:\\Users\\RR\\AppData\\Local\\Programs\\Python\\Python37\\python.exe', '-m', 'virtualenv', '--no-site-packages', 'C:\\Users\\RR\\.espressif\\python_env\\idf4.0_py3.7_env']' returned non-zero exit status 2.
                          
2020-02-29 12:28:25.360   --------
2020-02-29 12:28:25.360   Message box (OK):
                          Installation has failed with exit code 1


User avatar
ESP_krzychb
Posts: 400
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: esp-idf-tools-setup-2.2.exe Installation has failed with exit code 1

Postby ESP_krzychb » Sat Feb 29, 2020 1:39 pm

Hello gerrikoio,

From the log I see you are installing ESP-IDF 4.0. If so then:

1. Use https://dl.espressif.com/dl/esp-idf-tools-setup-2.3.exe
2. Let the installer download a fresh copy of ESP-IDF

This issue is discussed in more details in https://github.com/espressif/esp-idf/issues/4744

User avatar
gerrikoio
Posts: 8
Joined: Fri Sep 28, 2018 9:41 am

Re: esp-idf-tools-setup-2.2.exe Installation has failed with exit code 1

Postby gerrikoio » Sat Feb 29, 2020 7:09 pm

Ok, thanks.

I will do that and use esp-idf-tools-setup-2.3.exe.

rglissmann
Posts: 10
Joined: Wed Feb 19, 2020 1:08 am

Re: esp-idf-tools-setup-2.2.exe Installation has failed with exit code 1

Postby rglissmann » Sat Feb 29, 2020 9:04 pm

I reinstalled using Python 3.7 instead of Python27 and everything installed successfully. :D

User avatar
gerrikoio
Posts: 8
Joined: Fri Sep 28, 2018 9:41 am

Re: esp-idf-tools-setup-2.2.exe Installation has failed with exit code 1

Postby gerrikoio » Sun Mar 01, 2020 1:02 pm

esp-idf-tools-setup-2.3.exe Installation works! :D

hugokni
Posts: 1
Joined: Sun Mar 01, 2020 10:09 pm

Re: esp-idf-tools-setup-2.2.exe Installation has failed with exit code 1

Postby hugokni » Mon Mar 02, 2020 12:38 pm

After failing the installation edit the file: ...\esp-idf\tools\idf_tools.py

In my case, it was the line 1183. Remove the argument '--no-site-packages' of the function.

The function looks like this before editing:

Code: Select all

subprocess.check_call([sys.executable, '-m', 'virtualenv', '--no-site-packages', idf_python_env_path],
                              stdout=sys.stdout, stderr=sys.stderr)
Edit it to look like this:

Code: Select all

subprocess.check_call([sys.executable, '-m', 'virtualenv', idf_python_env_path],
                              stdout=sys.stdout, stderr=sys.stderr)
Try installing again using your previous installation folders.

Who is online

Users browsing this forum: Baidu [Spider] and 93 guests