Ubuntu ESP8266开发环境问题:No rule to make target ‘check_python_dependencies‘

一、开发环境

Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic

二、报错信息

1、make menuconfig 报错

在这里插入图片描述

lsq@ubuntu:~/ESP8266_RTOS_SDK/examples/get-started/hello_world$ make menuconfig
Toolchain path: /home/lsq/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc
Toolchain version: esp-2020r3-49-gd5524c1
Compiler version: 8.4.0
The following Python requirements are not satisfied:
click>=5.0
pyserial>=3.0
future>=0.15.2
pyparsing>=2.0.3,<2.4.0
pyelftools>=0.22
Please refer to the Get Started section of the ESP-IDF Programming Guide for setting up the required packages.
Alternatively, you can run “/usr/bin/python -m pip install --user -r /home/lsq/ESP8266_RTOS_SDK/requirements.txt” for resolving the issue.
make: *** No rule to make target ‘check_python_dependencies’, needed by ‘menuconfig’. Stop.

2、 make all 报错在这里插入图片描述

lsq@ubuntu:/mnt/hgfs/share/ESP8266_Project/hello_world$ make all
The following Python requirements are not satisfied:
click>=5.0
pyserial>=3.0
future>=0.15.2
pyparsing>=2.0.3,<2.4.0
pyelftools>=0.22
Please refer to the Get Started section of the ESP-IDF Programming Guide for setting up the required packages.
Alternatively, you can run “/usr/bin/python -m pip install --user -r /mnt/hgfs/share/ESP8266_RTOS_SDK/requirements.txt” for resolving the issue.
make: *** No rule to make target ‘check_python_dependencies’, needed by ‘all’. Stop.

三、解决办法

根据提示信息:

Alternatively, you can run “/usr/bin/python -m pip install --user -r /home/lsq/ESP8266_RTOS_SDK/requirements.txt” for resolving the issue.

在shell终端输入:/usr/bin/python -m pip install --user -r /home/lsq/ESP8266_RTOS_SDK/requirements.txt
(注意:路径根据自己的提示信息做修改)

lsq@ubuntu:/mnt/hgfs/share/ESP8266_Project$ /usr/bin/python -m pip install --user -r /mnt/hgfs/share/ESP8266_RTOS_SDK/requirements.txt
Collecting setuptools (from -r /mnt/hgfs/share/ESP8266_RTOS_SDK/requirements.txt (line 4))
Using cached https://files.pythonhosted.org/packages/b0/3a/88b210db68e56854d0bcf4b38e165e03be377e13907746f825790f3df5bf/setuptools-59.6.0-py3-none-any.whl
Collecting click>=5.0 (from -r /mnt/hgfs/share/ESP8266_RTOS_SDK/requirements.txt (line 8))
Using cached https://files.pythonhosted.org/packages/4a/a8/0b2ced25639fb20cc1c9784de90a8c25f9504a7f18cd8b5397bd61696d7d/click-8.0.4-py3-none-any.whl
Collecting pyserial>=3.0 (from -r /mnt/hgfs/share/ESP8266_RTOS_SDK/requirements.txt (line 9))
Using cached https://files.pythonhosted.org/packages/07/bc/587a445451b253b285629263eb51c2d8e9bcea4fc97826266d186f96f558/pyserial-3.5-py2.py3-none-any.whl
Collecting future>=0.15.2 (from -r /mnt/hgfs/share/ESP8266_RTOS_SDK/requirements.txt (line 10))
Using cached https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz
Collecting cryptography<35,>=2.1.4 (from -r /mnt/hgfs/share/ESP8266_RTOS_SDK/requirements.txt (line 11))
Using cached https://files.pythonhosted.org/packages/cc/98/8a258ab4787e6f835d350639792527d2eb7946ff9fc0caca9c3f4cf5dcfe/cryptography-3.4.8.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-build-8o4iryj6/cryptography/setup.py”, line 14, in
from setuptools_rust import RustExtension
ModuleNotFoundError: No module named ‘setuptools_rust’

        =============================DEBUG ASSISTANCE==========================
        If you are seeing an error here please try the following to
        successfully install cryptography:

        Upgrade to the latest pip and try again. This will fix errors for most
        users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
        =============================DEBUG ASSISTANCE==========================


----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-8o4iryj6/cryptography/

未解决问题,升级pip版本:pip3 install --upgrade pip

lsq@ubuntu:/mnt/hgfs/share/ESP8266_Project$ pip3 install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.1-py3-none-any.whl (1.7MB)
100% |████████████████████████████████| 1.7MB 319kB/s
Installing collected packages: pip
Successfully installed pip-21.3.1

再执行一次:/usr/bin/python -m pip install --user -r /home/lsq/ESP8266_RTOS_SDK/requirements.txt
(注意:路径根据自己的提示信息做修改)

lsq@ubuntu:/mnt/hgfs/share/ESP8266_Project$ /usr/bin/python -m pip install --user -r /mnt/hgfs/share/ESP8266_RTOS_SDK/requirements.txt
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from -r /mnt/hgfs/share/ESP8266_RTOS_SDK/requirements.txt (line 4)) (39.0.1)
Collecting click>=5.0
Using cached click-8.0.4-py3-none-any.whl (97 kB)
Collecting pyserial>=3.0
Using cached pyserial-3.5-py2.py3-none-any.whl (90 kB)
Collecting future>=0.15.2
Using cached future-0.18.2.tar.gz (829 kB)
Preparing metadata (setup.py) … done
Requirement already satisfied: cryptography<35,>=2.1.4 in /usr/lib/python3/dist-packages (from -r /mnt/hgfs/share/ESP8266_RTOS_SDK/requirements.txt (line 11)) (2.1.4)
Collecting pyparsing<2.4.0,>=2.0.3
Downloading pyparsing-2.3.1-py2.py3-none-any.whl (61 kB)
|████████████████████████████████| 61 kB 165 kB/s
Collecting pyelftools>=0.22
Downloading pyelftools-0.29-py2.py3-none-any.whl (174 kB)
|████████████████████████████████| 174 kB 250 kB/s
Requirement already satisfied: importlib-metadata in /home/lsq/.local/lib/python3.6/site-packages (from click>=5.0->-r /mnt/hgfs/share/ESP8266_RTOS_SDK/requirements.txt (line 8)) (4.8.3)
Requirement already satisfied: zipp>=0.5 in /home/lsq/.local/lib/python3.6/site-packages (from importlib-metadata->click>=5.0->-r /mnt/hgfs/share/ESP8266_RTOS_SDK/requirements.txt (line 8)) (3.6.0)
Requirement already satisfied: typing-extensions>=3.6.4 in /home/lsq/.local/lib/python3.6/site-packages (from importlib-metadata->click>=5.0->-r /mnt/hgfs/share/ESP8266_RTOS_SDK/requirements.txt (line 8)) (4.1.1)
Building wheels for collected packages: future
Building wheel for future (setup.py) … done
Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=493275 sha256=59d166f0777e78c77b0f07f25afb4c73f6172b0a71333952f727b3d5002b1350
Stored in directory: /home/lsq/.cache/pip/wheels/6e/9c/ed/4499c9865ac1002697793e0ae05ba6be33553d098f3347fb94
Successfully built future
Installing collected packages: pyserial, pyparsing, pyelftools, future, click
Successfully installed click-8.0.4 future-0.18.2 pyelftools-0.29 pyparsing-2.3.1 pyserial-3.5

解决问题。

四、参考链接

#解决pip版本太低或者pip有问题的问题:https://blog.csdn.net/xiaojun1288/article/details/121357721
#官方资料:https://docs.espressif.com/projects/esp8266-rtos-sdk/en/latest/get-started/index.html#guides

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值