Error to install esp-idf

BrunoOtavio
Posts: 8
Joined: Wed Sep 25, 2019 8:31 pm

Error to install esp-idf

Postby BrunoOtavio » Wed Sep 25, 2019 8:36 pm

Hello everyone, I´m trying to install the esp-idf in my computer but when the process is almost finishing and the requirements are being installed i receive an error, i going to put a piece of the log file where the error is displayed:

2019-09-25 17:34:37.443 Installing Python environment:C:\Python\python.exe C:\ESP\.espressif\idf_tools_fallback.py --idf-path C:\ESP_IDF --tools C:\ESP\.espressif\tools_fallback.json install-python-env

2019-09-25 17:34:38.190 Done, exit code=1
2019-09-25 17:34:38.190 --------
2019-09-25 17:34:38.190 Running command: C:\Python\python.exe C:\ESP\.espressif\idf_tools_fallback.py --idf-path C:\ESP_IDF --tools C:\ESP\.espressif\tools_fallback.json install-python-env

Could not import runpy module
ModuleNotFoundError: No module named 'runpy'
Installing Python packages from C:\ESP_IDF\requirements.txt
Traceback (most recent call last):
File "C:\ESP\.espressif\idf_tools_fallback.py", line 1249, in <module>
main(sys.argv[1:])
File "C:\ESP\.espressif\idf_tools_fallback.py", line 1245, in main
action_func(args)
File "C:\ESP\.espressif\idf_tools_fallback.py", line 1076, in action_install_python_env
subprocess.check_call(run_args, stdout=sys.stdout, stderr=sys.stderr)
File "C:\Python\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\ESP\\.espressif\\python_env\\idf3.3_py3.7_env\\Scripts\\python.exe', '-m', 'pip', 'install', '--no-warn-script-location', '-r', 'C:\\ESP_IDF\\requirements.txt']' returned non-zero exit status 1.

2019-09-25 17:34:38.190 --------
2019-09-25 17:34:38.190 Message box (OK):
Installation has failed with exit code 1
2019-09-25 17:34:43.548 User chose OK.
2019-09-25 17:34:43.560 Message box (Yes/No):
Installation log has been created, it may contain more information about the problem.
Display the installation log now?
2019-09-25 17:34:44.621 User chose Yes.
2019-09-25 17:34:44.653 CurStepChanged raised an exception.

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: Error to install esp-idf

Postby ESP_igrr » Wed Sep 25, 2019 9:24 pm

Please try the following steps to troubleshoot this:


1. From the command line, run "python3 -m pip install virtualenv" and see if this works

2. After that, try to create a virtual environment manually: "python3 -m virtualenv myenv" in some directory you can write to (e.g. C:\ESP)

3. Delete C:\\ESP\\.espressif\\python_env\\idf3.3_py3.7_env directory

4. Run the installer again

If any of the steps fail, please report back. The first two steps are to make sure your Python3 installation is functioning well.

BrunoOtavio
Posts: 8
Joined: Wed Sep 25, 2019 8:31 pm

Re: Error to install esp-idf

Postby BrunoOtavio » Thu Sep 26, 2019 10:01 pm

Hello, thank you for your help, that error was solved, but now another error related with encoding is appearing:
Running command: C:\Python\python.exe C:\ESP\.espressif\idf_tools_fallback.py --idf-path C:\ESP_IDF --tools C:\ESP\.espressif\tools_fallback.json install-python-env
Using base prefix 'C:\\Python'
New python executable in C:\ESP\.espressif\python_env\idf3.3_py3.7_env\Scripts\python.exe
Installing setuptools, pip, wheel...
done.
Traceback (most recent call last):
File "C:\Users\Bruno Otávio\AppData\Roaming\Python\Python37\site-packages\virtualenv.py", line 939, in call_subprocess
line = line.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe1 in position 38: invalid continuation byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Bruno Otávio\AppData\Roaming\Python\Python37\site-packages\virtualenv.py", line 2632, in <module>
main()
File "C:\Users\Bruno Otávio\AppData\Roaming\Python\Python37\site-packages\virtualenv.py", line 870, in main
symlink=options.symlink,
File "C:\Users\Bruno Otávio\AppData\Roaming\Python\Python37\site-packages\virtualenv.py", line 1173, in create_environment
install_wheel(to_install, py_executable, search_dirs, download=download)
File "C:\Users\Bruno Otávio\AppData\Roaming\Python\Python37\site-packages\virtualenv.py", line 1019, in install_wheel
_install_wheel_with_search_dir(download, project_names, py_executable, search_dirs)
File "C:\Users\Bruno Otávio\AppData\Roaming\Python\Python37\site-packages\virtualenv.py", line 1110, in _install_wheel_with_search_dir
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=script)
File "C:\Users\Bruno Otávio\AppData\Roaming\Python\Python37\site-packages\virtualenv.py", line 941, in call_subprocess
line = line.decode(fs_encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe1 in position 38: invalid continuation byte
Creating a new Python environment in C:\ESP\.espressif\python_env\idf3.3_py3.7_env
Traceback (most recent call last):
File "C:\ESP\.espressif\idf_tools_fallback.py", line 1249, in <module>
main(sys.argv[1:])
File "C:\ESP\.espressif\idf_tools_fallback.py", line 1245, in main
action_func(args)
File "C:\ESP\.espressif\idf_tools_fallback.py", line 1069, in action_install_python_env
stdout=sys.stdout, stderr=sys.stderr)
File "C:\Python\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Python\\python.exe', '-m', 'virtualenv', '--no-site-packages', 'C:\\ESP\\.espressif\\python_env\\idf3.3_py3.7_env']' returned non-zero exit status 1.

BrunoOtavio
Posts: 8
Joined: Wed Sep 25, 2019 8:31 pm

Re: Error to install esp-idf

Postby BrunoOtavio » Sat Sep 28, 2019 1:12 am

Its working now, thank you for your help!

LahiruLKR
Posts: 6
Joined: Sun Jul 28, 2019 6:07 pm

Re: Error to install esp-idf

Postby LahiruLKR » Fri Nov 01, 2019 6:57 am

Hi, I'm also having a trouble with installing esp-idf tool setup. I get the following log with error code -2. Could you please help me with this issue?

2019-11-01 11:59:33.305 Installing tools:C:\Python37\python.exe "C:\Users\lahiru_r\.espressif\idf_tools_fallback.py" --idf-path C:\Users\lahiru_r\Documents\ESP32\esp-idf --tools "C:\Users\lahiru_r\.espressif\tools_fallback.json" install
2019-11-01 11:59:33.345 ProcStart failed
2019-11-01 11:59:33.345 Done, exit code=-2
2019-11-01 11:59:33.345 --------
2019-11-01 11:59:33.345 Running command: C:\Python37\python.exe "C:\Users\lahiru_r\.espressif\idf_tools_fallback.py" --idf-path C:\Users\lahiru_r\Documents\ESP32\esp-idf --tools "C:\Users\lahiru_r\.espressif\tools_fallback.json" install

2019-11-01 11:59:33.345 --------
2019-11-01 11:59:33.345 Message box (OK):
Installation has failed with exit code -2

lijincai
Posts: 1
Joined: Sat Mar 14, 2020 5:53 am

Re: Error to install esp-idf

Postby lijincai » Sun Mar 15, 2020 8:00 am

Hi! I encountered the same problem when installing esp-idf, which annoyed me. Have you solved the problem? Can you give me some help?

dipen@1337lab.io
Posts: 12
Joined: Wed Jan 29, 2020 8:45 am

Re: Error to install esp-idf

Postby dipen@1337lab.io » Fri Apr 24, 2020 11:35 am

Namaste ESP_igrr and Forum Members,

I'm encountering the same error when running the esp-idf-tools-setup-2.3.exe.
1. From the command line, run "python3 -m pip install virtualenv" and see if this works

2. After that, try to create a virtual environment manually: "python3 -m virtualenv myenv" in some directory you can write to (e.g. C:\ESP)

3. Delete C:\\ESP\\.espressif\\python_env\\idf3.3_py3.7_env directory

4. Run the installer again


I performed the first two steps as suggested and, the commands executed successfully w/o any errors. However, I could not find the directory path as suggested in step #3. So, ignoring step #3, I proceeded to step #4 but still got the same error.

Kindly suggest how to proceed further.

Thanks | Regards,
Dipen

melt3200
Posts: 1
Joined: Thu Jan 06, 2022 9:56 am

Re: Error to install esp-idf

Postby melt3200 » Thu Jan 06, 2022 10:06 am

Hi , I´m also trying to install the esp-idf in my computer but when the process is almost finishing and the requirements are being installed i receive an error, i going to put a piece of the log file where the error is displayed:

ERROR: Could not find a version that satisfies the requirement click>=7.0
ERROR: No matching distribution found for click>=7.0
Traceback (most recent call last):
File "C:\Users\86187\esp\esp-idf\tools\idf_tools.py", line 1818, in <module>
main(sys.argv[1:])
File "C:\Users\86187\esp\esp-idf\tools\idf_tools.py", line 1814, in main
action_func(args)
File "C:\Users\86187\esp\esp-idf\tools\idf_tools.py", line 1535, in action_install_python_env
subprocess.check_call(run_args, stdout=sys.stdout, stderr=sys.stderr)
File "subprocess.py", line 364, in check_call
subprocess.CalledProcessError: Command '['C:\\Users\\86187\\.espressif\\python_env\\idf4.3_py3.8_env\\Scripts\\python.exe', '-m', 'pip', 'install', '--no-warn-script-location', '-r', 'C:\\Users\\86187\\esp\\esp-idf\\requirements.txt', '--extra-index-url', 'https://dl.espressif.com/pypi']' returned non-zero exit status 1.
Command failed: C:\Users\86187\.espressif\tools\idf-python\3.8.7\python.exe C:\Users\86187\esp\esp-idf\tools\idf_tools.py install-python-env
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /simple/click/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /simple/click/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /simple/click/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /simple/click/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /simple/click/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /pypi/click/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /pypi/click/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /pypi/click/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /pypi/click/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /pypi/click/
ERROR: Could not find a version that satisfies the requirement click>=7.0
ERROR: No matching distribution found for click>=7.0
Traceback (most recent call last):
File "C:\Users\86187\esp\esp-idf\tools\idf_tools.py", line 1818, in <module>
main(sys.argv[1:])
File "C:\Users\86187\esp\esp-idf\tools\idf_tools.py", line 1814, in main
action_func(args)
File "C:\Users\86187\esp\esp-idf\tools\idf_tools.py", line 1535, in action_install_python_env
subprocess.check_call(run_args, stdout=sys.stdout, stderr=sys.stderr)
File "subprocess.py", line 364, in check_call
subprocess.CalledProcessError: Command '['C:\\Users\\86187\\.espressif\\python_env\\idf4.3_py3.8_env\\Scripts\\python.exe', '-m', 'pip', 'install', '--no-warn-script-location', '-r', 'C:\\Users\\86187\\esp\\esp-idf\\requirements.txt', '--extra-index-url', 'https://dl.espressif.com/pypi']' returned non-zero exit status 1.

I really need your help,thanks!

ESP_georgik
Posts: 21
Joined: Fri Nov 06, 2020 8:23 am
Location: Brno
Contact:

Re: Error to install esp-idf

Postby ESP_georgik » Thu Jan 06, 2022 11:47 am

Problem described above seems like TLS issue.
dl.espressif.com is hosted with enabled TLSv1.2 so it should work also on OSes like Windows 8 which does not have support for TLSv1.3.

Try following steps to mitigate the problem:
Option #1:
- open https://dl.espressif.com/pypi in Internet Explorer or Edge, this should refresh certificates for the site
- repeat installation process

Option #2:
- run installation with Online Installer https://github.com/espressif/idf-instal ... 13-beta-08
- check the second screen with System Check whether you see any error when connecting to dl.espressif.com
- in case of error, please post the message
- Juraj Michálek
Senior Embedded Software Engineer at Espressif Systems

uwe_pg
Posts: 11
Joined: Sun Jun 18, 2017 9:07 am

Re: Error to install esp-idf

Postby uwe_pg » Sun Jan 09, 2022 2:41 pm

Hello,
I got the same problem on macOS and I can't use the windows Online Installer.
Option #1 didn't work, too.
What can I do?

Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 391 guests