Error to install esp-idf

BrunoOtavio
Posts: 3
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: 1690
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: 3
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: 3
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

Who is online

Users browsing this forum: Victoria Nope and 41 guests