ESP-IDF Installation Error.

Vinayak
Posts: 9
Joined: Thu Jul 15, 2021 6:20 am

ESP-IDF Installation Error.

Postby Vinayak » Thu Jul 15, 2021 4:50 pm

Hi ESP Community,
I am installing ESP-IDF but getting following errors. I followed this official link https://github.com/espressif/idf-eclips ... requisites to install.

Installing tools...
This can take a while. Please be patient.
Executing C:\Users\info\AppData\Local\Programs\Python\Python37\python.exe C:\esp-idf\esp-idf_v4.3\tools\idf_tools.py install all
Traceback (most recent call last):
File "C:\esp-idf\esp-idf_v4.3\tools\idf_tools.py", line 1672, in <module>
main(sys.argv[1:])
File "C:\esp-idf\esp-idf_v4.3\tools\idf_tools.py", line 1668, in main
action_func(args)
File "C:\esp-idf\esp-idf_v4.3\tools\idf_tools.py", line 1282, in action_install
tools_info = load_tools_info()
File "C:\esp-idf\esp-idf_v4.3\tools\idf_tools.py", line 922, in load_tools_info
with open(tool_versions_file_name, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\info\\OneDrive\\Desktop\\esp-idf;%IDF_PATH%\\tools\\tools/tools.json'

Executing C:\Users\info\AppData\Local\Programs\Python\Python37\python.exe C:\esp-idf\esp-idf_v4.3\tools\idf_tools.py install-python-env
Traceback (most recent call last):
File "C:\esp-idf\esp-idf_v4.3\tools\idf_tools.py", line 1672, in <module>
main(sys.argv[1:])
File "C:\esp-idf\esp-idf_v4.3\tools\idf_tools.py", line 1668, in main
action_func(args)
File "C:\esp-idf\esp-idf_v4.3\tools\idf_tools.py", line 1340, in action_install_python_env
idf_python_env_path, _, virtualenv_python = get_python_env_path()
File "C:\esp-idf\esp-idf_v4.3\tools\idf_tools.py", line 968, in get_python_env_path
cwd=global_idf_path, env=os.environ).decode()
File "C:\Users\info\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 376, in check_output
**kwargs).stdout
File "C:\Users\info\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 453, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\info\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 756, in __init__
restore_signals, start_new_session)
File "C:\Users\info\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 1155, in _execute_child
startupinfo)
NotADirectoryError: [WinError 267] The directory name is invalid

Executing C:\Users\info\AppData\Local\Programs\Python\Python37\python.exe C:\esp-idf\esp-idf_v4.3\tools\idf_tools.py export --format=key-value
Traceback (most recent call last):
File "C:\esp-idf\esp-idf_v4.3\tools\idf_tools.py", line 1672, in <module>
main(sys.argv[1:])
File "C:\esp-idf\esp-idf_v4.3\tools\idf_tools.py", line 1668, in main
action_func(args)
File "C:\esp-idf\esp-idf_v4.3\tools\idf_tools.py", line 1055, in action_export
tools_info = load_tools_info()
File "C:\esp-idf\esp-idf_v4.3\tools\idf_tools.py", line 922, in load_tools_info
with open(tool_versions_file_name, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\info\\OneDrive\\Desktop\\esp-idf;%IDF_PATH%\\tools\\tools/tools.json'
Configured CDT Build Environment variables. You can check Preferences > C/C++ > Build > Environment
Configured CMake toolchain. You can check Preferences > C/C++ > CMake
Install tools completed.

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

Re: ESP-IDF Installation Error.

Postby ESP_kondalkolipaka » Wed Jul 21, 2021 2:39 am

Hi @vinayak,
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\info\\OneDrive\\Desktop\\esp-idf;%IDF_PATH%\\tools\\tools/tools.json
`idf_tools.py install all` command is getting failed because of the bove path issue. It seems to be tools.json file path is not interpreted correctly. Could you verify IDE_PATH in the Eclipse CDT build environment variables?

Preferences > C/C++ Build > Environment

Anurag Paul
Posts: 11
Joined: Thu Jul 14, 2022 5:07 am

Re: ESP-IDF Installation Error.

Postby Anurag Paul » Tue Aug 09, 2022 6:12 am

Hi there

I also encounter a similar error ::

Installing tools...
This can take a while. Please be patient.
Executing C:\Users\Phynart\AppData\Local\Programs\Python\Python310\python.exe C:\Users\Phynart\Documents\GitHub\esp-idf\tools\idf_tools.py install all
Traceback (most recent call last):
File "C:\Users\Phynart\Documents\GitHub\esp-idf\tools\idf_tools.py", line 1860, in <module>
main(sys.argv[1:])
File "C:\Users\Phynart\Documents\GitHub\esp-idf\tools\idf_tools.py", line 1856, in main
action_func(args)
File "C:\Users\Phynart\Documents\GitHub\esp-idf\tools\idf_tools.py", line 1417, in action_install
tools_info = load_tools_info()
File "C:\Users\Phynart\Documents\GitHub\esp-idf\tools\idf_tools.py", line 944, in load_tools_info
with open(tool_versions_file_name, 'r') as f: # type: ignore
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Espressif\\frameworks\\esp-idf-v4.2\\esp-idf\\tools/tools.json'

Executing C:\Users\Phynart\AppData\Local\Programs\Python\Python310\python.exe C:\Users\Phynart\Documents\GitHub\esp-idf\tools\idf_tools.py install-python-env
WARNING: Git was not found
WARNING: Is it not possible to determine the IDF version: [Errno 2] No such file or directory: 'C:\\Espressif\\frameworks\\esp-idf-v4.2\\esp-idf\\components\\esp_common\\include\\esp_idf_version.h'
ERROR: IDF version cannot be determined

Executing C:\Users\Phynart\AppData\Local\Programs\Python\Python310\python.exe C:\Users\Phynart\Documents\GitHub\esp-idf\tools\idf_tools.py export --format=key-value
Traceback (most recent call last):
File "C:\Users\Phynart\Documents\GitHub\esp-idf\tools\idf_tools.py", line 1860, in <module>
main(sys.argv[1:])
File "C:\Users\Phynart\Documents\GitHub\esp-idf\tools\idf_tools.py", line 1856, in main
action_func(args)
File "C:\Users\Phynart\Documents\GitHub\esp-idf\tools\idf_tools.py", line 1176, in action_export
tools_info = load_tools_info()
File "C:\Users\Phynart\Documents\GitHub\esp-idf\tools\idf_tools.py", line 944, in load_tools_info
with open(tool_versions_file_name, 'r') as f: # type: ignore
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Espressif\\frameworks\\esp-idf-v4.2\\esp-idf\\tools/tools.json'
Configured CDT Build Environment variables. You can check Preferences > C/C++ > Build > Environment
Configured CMake toolchain. You can check Preferences > C/C++ > CMake
Install tools completed.

JimNickerson
Posts: 6
Joined: Mon Jun 01, 2020 7:19 pm

Re: ESP-IDF Installation Error.

Postby JimNickerson » Tue Aug 09, 2022 4:33 pm

I have been using vscode esp-idf from esp-idf-v4.4.1.zip
I tried to update to esp-idf-v4.4.2.zip
it failed with this error ModuleNotFoundError: No module named 'setuptools.command.build'

Command failed: "d:\EspTools\tools\idf-python\3.8.7\python.exe" "d:\Esp4-4-2\esp-idf\tools\idf_tools.py" install-python-env
ERROR: Command errored out with exit status 1:
command: 'd:\EspTools\python_env\idf4.4_py3.8_env\Scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\JimNi\\AppData\\Local\\Temp\\pip-req-build-dz_pe4sx\\setup.py'"'"'; __file__='"'"'C:\\Users\\JimNi\\AppData\\Local\\Temp\\pip-req-build-dz_pe4sx\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\JimNi\AppData\Local\Temp\pip-pip-egg-info-8j01atym'
cwd: C:\Users\JimNi\AppData\Local\Temp\pip-req-build-dz_pe4sx\
Complete output (34 lines):
running egg_info
creating C:\Users\JimNi\AppData\Local\Temp\pip-pip-egg-info-8j01atym\esp_windows_curses.egg-info
writing C:\Users\JimNi\AppData\Local\Temp\pip-pip-egg-info-8j01atym\esp_windows_curses.egg-info\PKG-INFO
writing dependency_links to C:\Users\JimNi\AppData\Local\Temp\pip-pip-egg-info-8j01atym\esp_windows_curses.egg-info\dependency_links.txt
writing requirements to C:\Users\JimNi\AppData\Local\Temp\pip-pip-egg-info-8j01atym\esp_windows_curses.egg-info\requires.txt
writing top-level names to C:\Users\JimNi\AppData\Local\Temp\pip-pip-egg-info-8j01atym\esp_windows_curses.egg-info\top_level.txt
writing manifest file 'C:\Users\JimNi\AppData\Local\Temp\pip-pip-egg-info-8j01atym\esp_windows_curses.egg-info\SOURCES.txt'
reading manifest file 'C:\Users\JimNi\AppData\Local\Temp\pip-pip-egg-info-8j01atym\esp_windows_curses.egg-info\SOURCES.txt'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\JimNi\AppData\Local\Temp\pip-req-build-dz_pe4sx\setup.py", line 19, in <module>
setup(name='esp-windows-curses',
File "d:\EspTools\python_env\idf4.4_py3.8_env\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "distutils\core.py", line 148, in setup
File "distutils\dist.py", line 966, in run_commands
File "distutils\dist.py", line 985, in run_command
File "d:\EspTools\python_env\idf4.4_py3.8_env\lib\site-packages\setuptools\command\egg_info.py", line 299, in run
self.find_sources()
File "d:\EspTools\python_env\idf4.4_py3.8_env\lib\site-packages\setuptools\command\egg_info.py", line 306, in find_sources
mm.run()
File "d:\EspTools\python_env\idf4.4_py3.8_env\lib\site-packages\setuptools\command\egg_info.py", line 544, in run
self.prune_file_list()
File "d:\EspTools\python_env\idf4.4_py3.8_env\lib\site-packages\setuptools\command\egg_info.py", line 596, in prune_file_list
build = self.get_finalized_command('build')
File "distutils\cmd.py", line 298, in get_finalized_command
File "distutils\dist.py", line 857, in get_command_obj
File "d:\EspTools\python_env\idf4.4_py3.8_env\lib\site-packages\setuptools\dist.py", line 755, in get_command_class
self.cmdclass[command] = cmdclass = ep.load()
File "d:\EspTools\python_env\idf4.4_py3.8_env\lib\site-packages\pkg_resources\__init__.py", line 2450, in load
return self.resolve()
File "d:\EspTools\python_env\idf4.4_py3.8_env\lib\site-packages\pkg_resources\__init__.py", line 2456, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'setuptools.command.build'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Traceback (most recent call last):
File "d:\Esp4-4-2\esp-idf\tools\idf_tools.py", line 1860, in <module>
main(sys.argv[1:])
File "d:\Esp4-4-2\esp-idf\tools\idf_tools.py", line 1856, in main
action_func(args)
File "d:\Esp4-4-2\esp-idf\tools\idf_tools.py", line 1577, in action_install_python_env
subprocess.check_call(run_args, stdout=sys.stdout, stderr=sys.stderr, env=env_copy)
File "subprocess.py", line 364, in check_call
subprocess.CalledProcessError: Command '['d:\\EspTools\\python_env\\idf4.4_py3.8_env\\Scripts\\python.exe', '-m', 'pip', 'install', '--no-warn-script-location', '-r', 'd:\\Esp4-4-2\\esp-idf\\requirements.txt', '--extra-index-url', 'https://dl.espressif.com/pypi']' returned non-zero exit status 1.

JimNickerson
Posts: 6
Joined: Mon Jun 01, 2020 7:19 pm

Re: ESP-IDF Installation Error.

Postby JimNickerson » Wed Aug 10, 2022 1:14 pm

FIXED
after much todo a friend "David" got his install to complete
he deleted the contents of the suggested install location C:\Users\xxxx\esp\
I tried that and the install still failed
I deleted the contents if the \esp suggested installation dir again
I also used the suggested dir for the tools install C:\Users\xxxx\esptools
I succeeded this time installing 4.4.2

I got this
WARNING: You are using pip version 20.3.3; however, version 22.2.2 is available.
You should consider upgrading via the 'C:\Users\JimNi\EspTools\python_env\idf4.4_py3.8_env\Scripts\python.exe -m pip install --upgrade pip' command.
As I have noticed in the past with most Microsoft products, if I accept the suggested defaults for install locations the install is successful more times than not.

Who is online

Users browsing this forum: No registered users and 15 guests