当前位置:网站首页>Espressif plays with the compilation environment
Espressif plays with the compilation environment
2022-07-26 08:53:00 【Embedded engineering lion】
Espressif Of ESP-IDF Recently released release/v5.0, I've been release/v4.3 On the development , Unconsciously, it has fallen behind 2 A version ( There's another one in the middle release/4.4 edition ). Then put your own ESP-IDF Updated to release/v5.0 edition , Originally thought that the implementation ./install.sh
The script is executed after . ./export.sh
You can complete the setup of the compilation environment , Facts have proved that nothing can be plain sailing .
The operating system I use is uBuntu, The system information is as follows :
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
Below is a list of some that are being installed ESP-IDF Of release/v5.0 Problems encountered in the compilation environment of and solutions .
python Version is too low
stay ESP-IDF Of release/v4.3 On Development , I'm using python The version is 3.6.9. take ESP-IDF Upgrade to release/v5.0 After the
./install.sh
Prompt python Version is too low , By looking at./install.sh
The script knows ,python Version check script${IDF_PATH}/tools/python_version_checker.py
, Continue to analyze the script, and now release/v5.0 Supported by pyhon The minimum version is 3.7 above .The solution is simple , upgrade python Version can , Can use
update-alternatives
Implement multiple python Version Management . This is what I installed python Of 3.8.12 edition .#!/usr/bin/env bash set -e set -u basedir=$(dirname "$0") IDF_PATH=$(cd "${basedir}"; pwd -P) export IDF_PATH echo "Detecting the Python interpreter" . "${IDF_PATH}/tools/detect_python.sh" echo "Checking Python compatibility" "${ESP_PYTHON}" "${IDF_PATH}/tools/python_version_checker.py" TARGETS=`"${ESP_PYTHON}" "${IDF_PATH}/tools/install_util.py" extract targets "[email protected]"` echo "Installing ESP-IDF tools" "${ESP_PYTHON}" "${IDF_PATH}/tools/idf_tools.py" install --targets=${ TARGETS} FEATURES=`"${ESP_PYTHON}" "${IDF_PATH}/tools/install_util.py" extract features "[email protected]"` echo "Installing Python environment and packages" "${ESP_PYTHON}" "${IDF_PATH}/tools/idf_tools.py" install-python-env --features=${ FEATURES} echo "All done! You can now run:" echo "" echo " . ${basedir}/export.sh" echo ""
import sys try: # Python 2 is not supported anymore but still the old way of typing is used here in order to give a nice Python # version failure and not a typing exception. from typing import Iterable except ImportError: pass OLDEST_PYTHON_SUPPORTED = (3, 7) # keep it as tuple for comparison with sys.version_info def _ver_to_str(it): # type: (Iterable) -> str return '.'.join(str(x) for x in it) def is_supported(): # type: () -> bool return sys.version_info[:2] >= OLDEST_PYTHON_SUPPORTED[:2] def check(): # type: () -> None if not is_supported(): raise RuntimeError( 'ESP-IDF supports Python {} or newer but you are using Python {}. Please upgrade your ' 'installation as described in the documentation.'.format( _ver_to_str(OLDEST_PYTHON_SUPPORTED), _ver_to_str(sys.version_info[:3]) ) ) if __name__ == '__main__': check()
/home/esp/.espressif/python_env/idf5.0_py3.8_env/bin/python: No module named pip
This problem is very strange , At first I thought I python Of 3.8.12 Version is not installed pip, So you can install it directly through the following commands pip:
sudo apt install python3-pip
After the installation is completed, execute directly
pip --version
Let's make sure pip Is the installation successful , The results are shown below :pip 22.2 from /home/esp/.local/lib/python3.8/site-packages/pip (python 3.8)
There is the information shown above , On behalf of pip Installation is successful , Then continue to execute
./install.sh
Script , It turns out that /home/esp/.espressif/python_env/idf5.0_py3.8_env/bin/python: No module named pip Error of , Mingming pip It has been installed successfully , How can this error be reported here .Get into ESP-IDF Of python Environmental Directory
~/.espressif/python_env/idf5.0_py3.8_env/lib/python3.8
, Found under this directorysite-packages
There is nopip
The catalog of , guess./install.sh
What you really want to use in the script is Espressif Self defined python Catalog , Not in ubuntu Specified on python Catalog .After the above analysis , There is only one solution , stay Espressif Self defined python Catalog
~/.espressif/python_env/idf5.0_py3.8_env/lib/python3.8
Under thesite-packages
Middle mount pip that will do . Execute the following two commands :curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
/home/esp/.espressif/python_env/idf5.0_py3.8_env/bin/python3 get-pip.py
Query after execution
site-packages
Catalog , It is found that there is alreadypip
Catalog . And then execute it again./install.sh
The script can be .
边栏推荐
- Ansible important components (playbook)
- 机器学习中的概率模型
- Pytoch learning - from tensor to LR
- Day06 homework -- skill question 2
- OA项目之我的会议(会议排座&送审)
- Media at home and abroad publicize that we should strictly grasp the content
- Okaleido launched the fusion mining mode, which is the only way for Oka to verify the current output
- MySQL 8.0 OCP 1z0-908 certification examination question bank 1
- Database operation topic 2
- Sklearn machine learning foundation (linear regression, under fitting, over fitting, ridge regression, model loading and saving)
猜你喜欢
数据库操作 题目二
Spark scheduling analysis
idea快捷键 alt实现整列操作
基于C语言实现的人机交互软件
node-v下载与应用、ES6模块导入与导出
Winter vacation homework & Stamp cutting
合工大苍穹战队视觉组培训Day5——机器学习,图像识别项目
uni-app 简易商城制作
KV database based on raft consensus protocol
Learning notes of automatic control principle - Performance Analysis of continuous time system
随机推荐
Pxe原理和概念
[database] gbase 8A MPP cluster v95 installation and uninstall
Media at home and abroad publicize that we should strictly grasp the content
基于C语言的哈夫曼转化软件
day06 作业--技能题1
Oracle 19C OCP 1z0-082 certification examination question bank (13-18)
Typescript snowflake primary key generator
第6天总结&数据库作业
Set of pl/sql -2
pl/sql之动态sql与异常
The largest number of statistical absolute values --- assembly language
Okaleido launched the fusion mining mode, which is the only way for Oka to verify the current output
Oracle 19C OCP 1z0-083 question bank (7-12)
Overview of motion recognition evaluation
[recommended collection] MySQL 30000 word essence summary + 100 interview questions (I)
Typescript encryption tool passwordencoder
tcp 解决short write问题
Pan micro e-cology8 foreground SQL injection POC
Winter vacation homework & Stamp cutting
Espressif 玩转 编译环境