当前位置:网站首页>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.shPrompt python Version is too low , By looking at./install.shThe 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-alternativesImplement 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-pipAfter the installation is completed, execute directly
pip --versionLet'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.shScript , 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-packagesThere is nopipThe catalog of , guess./install.shWhat 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.8Under thesite-packagesMiddle 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.pyQuery after execution
site-packagesCatalog , It is found that there is alreadypipCatalog . And then execute it again./install.shThe script can be .
边栏推荐
- 6、 Pinda general permission system__ pd-tools-log
- SSH,NFS,FTP
- Memory management based on C language - Simulation of dynamic partition allocation
- My meeting of OA project (query)
- 1、 Redis data structure
- [abstract base class inheritance, DOM, event - learning summary]
- P1825 [USACO11OPEN]Corn Maze S
- Transfer guide printing system based on C language design
- Database operation skills 6
- C # use npoi to operate Excel
猜你喜欢
随机推荐
Set of pl/sql -2
合工大苍穹战队视觉组培训Day6——传统视觉,图像处理
Oracle 19C OCP 1z0-082 certification examination question bank (13-18)
In the first year of L2, the upgrade of arbitrum nitro brought a more compatible and efficient development experience
PXE principles and concepts
C#入门系列(三十一) -- 运算符重载
Install HR schema, example, and Scott schema on Oracle and MySQL
Database operation topic 2
After MySQL 8 OCP (1z0-908), hand in your homework
Winter vacation homework & Stamp cutting
ES6模块化导入导出)(实现页面嵌套)
SSH,NFS,FTP
P3743 kotori的设备
2022年收益率最高的理财产品是哪个?
[untitled]
C # use npoi to operate Excel
【加密周报】加密市场有所回温?寒冬仍未解冻 盘点上周加密市场发生的重大事件
1、 Redis data structure
Sklearn machine learning foundation (linear regression, under fitting, over fitting, ridge regression, model loading and saving)
Foundry教程:使用多种方式编写可升级的智能合约(上)









