求助:idf安装失败“installation has failedwith exit code 1”

fly123
Posts: 1
Joined: Thu Feb 20, 2020 12:31 pm

求助:idf安装失败“installation has failedwith exit code 1”

Postby fly123 » Thu Feb 20, 2020 1:04 pm

在windows和ubuntu下都无法安装idf,请求帮助。
均为新安装的系统,windows环境为使用tools下载python3.7和git,ubuntu下采用编程指南里复制的命令(sudo apt-get install git wget flex bison gperf python python-pip python-setuptools python-serial python-click python-cryptography python-future python-pyparsing python-pyelftools cmake ninja-build ccache libffi-dev libssl-dev)。

不清楚应如何修改或改变环境配置解决此问题,还请帮忙解答

ubuntu:

Done
Extracting /home/f/.espressif/dist/xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz to /home/f/.espressif/tools/xtensa-esp32-elf/1.22.0-80-g6c4433a-5.2.0
Skipping esp32ulp-elf@2.28.51.20170517 (already installed)
Skipping openocd-esp32@v0.10.0-esp32-20190313 (already installed)
Installing Python environment and packages
Creating a new Python environment in /home/f/.espressif/python_env/idf3.3_py2.7_env
usage: virtualenv [--version] [--with-traceback] [-v | -q] [--discovery {builtin}] [-p py] [--creator {builtin,cpython2-posix}] [--seeder {app-data,pip}] [--no-seed] [--activators comma_separated_list] [--clear] [--system-site-packages]
[--symlinks | --copies] [--download | --no-download] [--extra-search-dir d [d ...]] [--pip version] [--setuptools version] [--wheel version] [--no-pip] [--no-setuptools] [--no-wheel] [--clear-app-data] [--symlink-app-data]
[--prompt prompt] [-h]
dest
virtualenv: error: unrecognized arguments: --no-site-packages
Traceback (most recent call last):
File "/home/f/esp/esp-idf/tools/idf_tools.py", line 1349, in <module>
main(sys.argv[1:])
File "/home/f/esp/esp-idf/tools/idf_tools.py", line 1345, in main
action_func(args)
File "/home/f/esp/esp-idf/tools/idf_tools.py", line 1156, in action_install_python_env
stdout=sys.stdout, stderr=sys.stderr)
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python', '-m', 'virtualenv', '--no-site-packages', '/home/f/.espressif/python_env/idf3.3_py2.7_env']' returned non-zero exit status 2



windows:
安装时出现exit code 1

020-02-20 20:51:56.471 Running command: C:\Users\F\AppData\Local\Programs\Python\Python37\python.exe D:\esp\esp-idf\tools\idf_tools.py install
Installing tools: xtensa-esp32-elf, esp32ulp-elf, cmake, openocd-esp32, mconf, ninja, idf-exe, ccache
Skipping xtensa-esp32-elf@1.22.0-80-g6c4433a5-5.2.0 (already installed)
Skipping esp32ulp-elf@2.28.51.20170517 (already installed)
Skipping cmake@3.13.4 (already installed)
Skipping openocd-esp32@v0.10.0-esp32-20190313 (already installed)
Skipping mconf@v4.6.0.0-idf-20190628 (already installed)
Skipping ninja@1.9.0 (already installed)
Skipping idf-exe@1.0.1 (already installed)
Skipping ccache@3.7 (already installed)

2020-02-20 20:51:56.471 --------
2020-02-20 20:51:56.486 Installing Python environment:C:\Users\F\AppData\Local\Programs\Python\Python37\python.exe D:\esp\esp-idf\tools\idf_tools.py install-python-env
2020-02-20 20:53:18.484 Done, exit code=1
2020-02-20 20:53:18.484 --------
2020-02-20 20:53:18.484 Running command: C:\Users\F\AppData\Local\Programs\Python\Python37\python.exe D:\esp\esp-idf\tools\idf_tools.py install-python-env
created virtual environment in 4376ms CPython3Windows(dest=D:\esp\.espressif\python_env\idf3.3_py3.7_env, clear=False, global=False) with seeder FromAppData pip=latest setuptools=latest wheel=latest app_data_dir=C:\Users\F\AppData\Local\pypa\virtualenv\seed-v1 via=copy
Requirement already satisfied: setuptools in d:\esp\.espressif\python_env\idf3.3_py3.7_env\lib\site-packages (from -r D:\esp\esp-idf\requirements.txt (line 4)) (45.2.0)
Collecting pyserial>=3.0
Downloading pyserial-3.4-py2.py3-none-any.whl (193 kB)
Collecting future>=0.15.2
Downloading future-0.18.2.tar.gz (829 kB)
ERROR: Could not find a version that satisfies the requirement cryptography>=2.1.4 (from -r D:\esp\esp-idf\requirements.txt (line 10)) (from versions: none)
ERROR: No matching distribution found for cryptography>=2.1.4 (from -r D:\esp\esp-idf\requirements.txt (line 10))
Creating a new Python environment in D:\esp\.espressif\python_env\idf3.3_py3.7_env
Installing Python packages from D:\esp\esp-idf\requirements.txt
Traceback (most recent call last):
File "D:\esp\esp-idf\tools\idf_tools.py", line 1349, in <module>
main(sys.argv[1:])
File "D:\esp\esp-idf\tools\idf_tools.py", line 1345, in main
action_func(args)
File "D:\esp\esp-idf\tools\idf_tools.py", line 1163, in action_install_python_env
subprocess.check_call(run_args, stdout=sys.stdout, stderr=sys.stderr)
File "C:\Users\F\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['D:\\esp\\.espressif\\python_env\\idf3.3_py3.7_env\\Scripts\\python.exe', '-m', 'pip', 'install', '--no-warn-script-location', '-r', 'D:\\esp\\esp-idf\\requirements.txt']' returned non-zero exit status 1.

2020-02-20 20:53:18.484 --------
2020-02-20 20:53:18.484 Message box (OK):
Installation has failed with exit code 1

ESP_Gargamel
Posts: 786
Joined: Wed Nov 14, 2018 8:45 am

Re: 求助:idf安装失败“installation has failedwith exit code 1”

Postby ESP_Gargamel » Wed Feb 26, 2020 10:00 am

ubuntu 下 pull 一下 release/v3.3,有个相关的 fix。
windows 下重试一下,有些包没下载下来,另外也需要 pull 最新的 release/v3.3。

--no-site-packages 的问题,在 release/v3.3 分支的 ec222a2d 有修正。也看下:https://github.com/espressif/esp-idf/issues/4744

GrandRiver
Posts: 9
Joined: Thu Dec 03, 2020 1:18 am

Re: 求助:idf安装失败“installation has failedwith exit code 1”

Postby GrandRiver » Thu Dec 03, 2020 1:41 pm

我也遇到 这个问题:
且我的IDF版本下载的是: esp-idf-v4.1.zip,问题依然存在,,求解。
File "C:\Users\GrandRiver\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Users\\GrandRiver\\.espressif\\python_env\\idf4.1_py3.7_env\\Scripts\\python.exe', '-m', 'pip', 'install', '--no-warn-script-location', '-r', 'C:\\Users\\GrandRiver\\Desktop\\esp-idf-3\\requirements.txt']' returned non-zero exit status 2.

2020-12-03 21:29:41.190 --------
2020-12-03 21:29:41.190 Message box (OK):
Installation has failed with exit code 1
2020-12-03 21:31:15.789 User chose OK.
2020-12-03 21:31:15.799 Message box (Yes/No):
Installation log has been created, it may contain more information about the problem.
Display the installation log now?
2020-12-03 21:31:17.769 User chose Yes.
2020-12-03 21:31:17.815 CurStepChanged raised an exception.

GrandRiver
Posts: 9
Joined: Thu Dec 03, 2020 1:18 am

Re: 求助:idf安装失败“installation has failedwith exit code 1”

Postby GrandRiver » Fri Dec 04, 2020 9:22 am

此问题已解决,参考此论坛的说明 ,将PIP版本降低到16.7.9就可以了

Who is online

Users browsing this forum: Bing [Bot] and 122 guests