ModuleNotFoundError: No module namedclick


🌮  ~/esp/esp-idf % ./install.sh esp32
Detecting the Python interpreter
Checking "python" ...
Checking "python3" ...
Python 3.9.8
"python3" has been detected
Installing ESP-IDF tools
Installing tools: xtensa-esp32-elf, xtensa-esp32s2-elf, xtensa-esp32s3-elf, riscv32-esp-elf, esp32ulp-elf, esp32s2ulp-elf, openocd-esp32
Skipping xtensa-esp32-elf@esp-2021r1-8.4.0 (already installed)
Skipping xtensa-esp32s2-elf@esp-2021r1-8.4.0 (already installed)
Skipping xtensa-esp32s3-elf@esp-2021r1-8.4.0 (already installed)
Skipping riscv32-esp-elf@esp-2021r1-8.4.0 (already installed)
Skipping esp32ulp-elf@2.28.51-esp-20191205 (already installed)
Skipping esp32s2ulp-elf@2.28.51-esp-20191205 (already installed)
Skipping openocd-esp32@v0.10.0-esp32-20210401 (already installed)
Installing Python environment and packages
Python 3.9.8
pip 21.3.1 from /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages/pip (python 3.9)
Installing Python packages from /Users/xylo/esp/esp-idf/requirements.txt
Looking in indexes: https://pypi.org/simple, https://dl.espressif.com/pypi
Ignoring None: markers 'sys_platform == "win32"' don't match your environment
Requirement already satisfied: setuptools>=21 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from -r /Users/xylo/esp/esp-idf/requirements.txt (line 4)) (58.3.0)
Requirement already satisfied: click>=7.0 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from -r /Users/xylo/esp/esp-idf/requirements.txt (line 8)) (8.0.3)
Requirement already satisfied: pyserial>=3.0 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from -r /Users/xylo/esp/esp-idf/requirements.txt (line 9)) (3.5)
Requirement already satisfied: future>=0.15.2 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from -r /Users/xylo/esp/esp-idf/requirements.txt (line 10)) (0.18.2)
Requirement already satisfied: cryptography>=2.1.4 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from -r /Users/xylo/esp/esp-idf/requirements.txt (line 11)) (35.0.0)
Requirement already satisfied: pyparsing<2.4.0,>=2.0.3 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from -r /Users/xylo/esp/esp-idf/requirements.txt (line 12)) (2.3.1)
Requirement already satisfied: pyelftools>=0.22 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from -r /Users/xylo/esp/esp-idf/requirements.txt (line 13)) (0.27)
Requirement already satisfied: gdbgui==0.13.2.0 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from -r /Users/xylo/esp/esp-idf/requirements.txt (line 15)) (0.13.2.0)
Requirement already satisfied: pygdbmi<=0.9.0.2 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from -r /Users/xylo/esp/esp-idf/requirements.txt (line 18)) (0.9.0.2)
Requirement already satisfied: python-socketio<5 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from -r /Users/xylo/esp/esp-idf/requirements.txt (line 21)) (4.6.1)
Requirement already satisfied: kconfiglib==13.7.1 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from -r /Users/xylo/esp/esp-idf/requirements.txt (line 23)) (13.7.1)
Requirement already satisfied: reedsolo<=1.5.4,>=1.5.3 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from -r /Users/xylo/esp/esp-idf/requirements.txt (line 26)) (1.5.4)
Requirement already satisfied: bitstring>=3.1.6 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from -r /Users/xylo/esp/esp-idf/requirements.txt (line 27)) (3.1.9)
Requirement already satisfied: ecdsa>=0.16.0 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from -r /Users/xylo/esp/esp-idf/requirements.txt (line 28)) (0.17.0)
Requirement already satisfied: construct==2.10.54 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from -r /Users/xylo/esp/esp-idf/requirements.txt (line 32)) (2.10.54)
Requirement already satisfied: Flask-SocketIO<3.0,>=2.9 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from gdbgui==0.13.2.0->-r /Users/xylo/esp/esp-idf/requirements.txt (line 15)) (2.9.6)
Requirement already satisfied: Pygments<3.0,>=2.2.0 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from gdbgui==0.13.2.0->-r /Users/xylo/esp/esp-idf/requirements.txt (line 15)) (2.10.0)
Requirement already satisfied: Flask<1.0,>=0.12.2 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from gdbgui==0.13.2.0->-r /Users/xylo/esp/esp-idf/requirements.txt (line 15)) (0.12.5)
Requirement already satisfied: Flask-Compress<2.0,>=1.4.0 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from gdbgui==0.13.2.0->-r /Users/xylo/esp/esp-idf/requirements.txt (line 15)) (1.10.1)
Requirement already satisfied: gevent<2.0,>=1.2.2 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from gdbgui==0.13.2.0->-r /Users/xylo/esp/esp-idf/requirements.txt (line 15)) (1.5.0)
Requirement already satisfied: cffi>=1.12 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from cryptography>=2.1.4->-r /Users/xylo/esp/esp-idf/requirements.txt (line 11)) (1.15.0)
Requirement already satisfied: six>=1.9.0 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from python-socketio<5->-r /Users/xylo/esp/esp-idf/requirements.txt (line 21)) (1.16.0)
Requirement already satisfied: python-engineio<4,>=3.13.0 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from python-socketio<5->-r /Users/xylo/esp/esp-idf/requirements.txt (line 21)) (3.14.2)
Requirement already satisfied: pycparser in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from cffi>=1.12->cryptography>=2.1.4->-r /Users/xylo/esp/esp-idf/requirements.txt (line 11)) (2.21)
Requirement already satisfied: itsdangerous>=0.21 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from Flask<1.0,>=0.12.2->gdbgui==0.13.2.0->-r /Users/xylo/esp/esp-idf/requirements.txt (line 15)) (2.0.1)
Requirement already satisfied: Werkzeug<1.0,>=0.7 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from Flask<1.0,>=0.12.2->gdbgui==0.13.2.0->-r /Users/xylo/esp/esp-idf/requirements.txt (line 15)) (0.16.1)
Requirement already satisfied: Jinja2>=2.4 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from Flask<1.0,>=0.12.2->gdbgui==0.13.2.0->-r /Users/xylo/esp/esp-idf/requirements.txt (line 15)) (3.0.3)
Requirement already satisfied: brotli in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from Flask-Compress<2.0,>=1.4.0->gdbgui==0.13.2.0->-r /Users/xylo/esp/esp-idf/requirements.txt (line 15)) (1.0.9)
Requirement already satisfied: greenlet>=0.4.14 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from gevent<2.0,>=1.2.2->gdbgui==0.13.2.0->-r /Users/xylo/esp/esp-idf/requirements.txt (line 15)) (1.1.2)
Requirement already satisfied: MarkupSafe>=2.0 in /Users/xylo/.espressif/python_env/idf4.3_py3.9_env/lib/python3.9/site-packages (from Jinja2>=2.4->Flask<1.0,>=0.12.2->gdbgui==0.13.2.0->-r /Users/xylo/esp/esp-idf/requirements.txt (line 15)) (2.0.1)
All done! You can now run:

  . ./export.sh

======================================
🌮  ~/esp/esp-idf % . ./export.sh                 
Setting IDF_PATH to '/Users/xylo/esp/esp-idf'
Detecting the Python interpreter
Checking "python" ...
Checking "python3" ...
Python 3.9.8
"python3" has been detected
Adding ESP-IDF tools to PATH...
Using Python interpreter in python: aliased to /usr/local/bin/python3
Checking if Python packages are up to date...
The following Python requirements are not satisfied:
click>=7.0
future>=0.15.2
pyparsing>=2.0.3,<2.4.0
pyelftools>=0.22
gdbgui==0.13.2.0
pygdbmi<=0.9.0.2
python-socketio<5
kconfiglib==13.7.1
construct==2.10.54
To install the missing packages, please run "/Users/xylo/esp/esp-idf/install.sh"
Diagnostic information:
    IDF_PYTHON_ENV_PATH: /Users/xylo/.espressif/python_env/idf4.3_py3.9_env
    Python interpreter used: /usr/local/opt/python@3.9/bin/python3.9
    Warning: python interpreter not running from IDF_PYTHON_ENV_PATH
    PATH: /Users/xylo/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin:/Users/xylo/.espressif/tools/xtensa-esp32s2-elf/esp-2021r1-8.4.0/xtensa-esp32s2-elf/bin:/Users/xylo/.espressif/tools/xtensa-esp32s3-elf/esp-2021r1-8.4.0/xtensa-esp32s3-elf/bin:/Users/xylo/.espressif/tools/riscv32-esp-elf/esp-2021r1-8.4.0/riscv32-esp-elf/bin:/Users/xylo/.espressif/tools/esp32ulp-elf/2.28.51-esp-20191205/esp32ulp-elf-binutils/bin:/Users/xylo/.espressif/tools/esp32s2ulp-elf/2.28.51-esp-20191205/esp32s2ulp-elf-binutils/bin:/Users/xylo/.espressif/tools/openocd-esp32/v0.10.0-esp32-20210401/openocd-esp32/bin:/Users/xylo/.espressif/python_env/idf4.3_py3.9_env/bin:/Users/xylo/esp/esp-idf/tools:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/lib/node_modules:/Applications/Little Snitch.app/Contents/Components:/Library/Apple/usr/bin
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'click'
🌮  ~/esp/esp-idf %

需要运行安装导出之前在终端取消设置“python”别名

// 先运行
unalias python
// 再运行,就不报错get_idf

原文地址:https://blog.csdn.net/weixin_43958308/article/details/134825057

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任

如若转载,请注明出处:http://www.7code.cn/show_49696.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱suwngjj01@126.com进行投诉反馈,一经查实,立即删除

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注