我的编程空间,编程开发者的网络收藏夹
学习永远不晚

记录VSCode配置ESP IDF到最后python virtual environment 错误解决:

短信预约 -IT技能 免费直播动态提醒
省份

北京

  • 北京
  • 上海
  • 天津
  • 重庆
  • 河北
  • 山东
  • 辽宁
  • 黑龙江
  • 吉林
  • 甘肃
  • 青海
  • 河南
  • 江苏
  • 湖北
  • 湖南
  • 江西
  • 浙江
  • 广东
  • 云南
  • 福建
  • 海南
  • 山西
  • 四川
  • 陕西
  • 贵州
  • 安徽
  • 广西
  • 内蒙
  • 西藏
  • 新疆
  • 宁夏
  • 兵团
手机号立即预约

请填写图片验证码后获取短信验证码

看不清楚,换张图片

免费获取短信验证码

记录VSCode配置ESP IDF到最后python virtual environment 错误解决:

记录VSCode配置ESP IDF到最后python virtual environment 错误解决:

在配置VSCode的扩展件ESP IDF的时候, 最后一步python virtual environment遇到以下错误:

Command failed: "x:/Software/Espressif/python_env/idf4.3_py3.8_env/Scripts/python.exe" -m pip install --upgrade --no-warn-script-location  -r "c:\Users\userName\.vscode\extensions\espressif.esp-idf-extension-1.4.0\requirements.txt"WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /simple/gcovr/WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /simple/gcovr/WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /simple/gcovr/WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /simple/gcovr/WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /simple/gcovr/ERROR: Could not find a version that satisfies the requirement gcovrERROR: No matching distribution found for gcovrCommand failed: "X:/Software/Espressif/python_env/idf4.3_py3.8_env/Scripts/python.exe" -m pip install --upgrade --no-warn-script-location  -r "c:\Users\userName\.vscode\extensions\espressif.esp-idf-extension-1.4.0\requirements.txt"

以及

Could not fetch URL https://pypi.org/simple/gcovr/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/gcovr/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))) - skipping

思来想去应该是连接不到国外的源

换源之:

  1. 关闭VSCode, 打开安装ESP的目录如下
X:\Software\Espressif\python_env\idf4.3_py3.8_env\Scripts
  1. cmd运行activate.bat, 换源, 运行deactivate.bat
activate.batpip config set global.index-url http://pypi.douban.com/simple/ deactivate.bat

​ 运行结果如下

X:\Software\Espressif\python_env\idf4.3_py3.8_env\Scripts>activate.bat(idf4.3_py3.8_env) X:\Software\Espressif\python_env\idf4.3_py3.8_env\Scripts>pip config set global.index-url http://pypi.douban.com/simple/Writing to C:\Users\userName\AppData\Roaming\pip\pip.ini(idf4.3_py3.8_env) X:\Software\Espressif\python_env\idf4.3_py3.8_env\Scripts>deactivate.bat
  1. 重新打开VSCode, 默认按键F1新建工程, 等待VSCode扩展件检查, 期间还可能遇到以下问题
"X:/Software/Espressif/python_env/idf4.3_py3.8_env/Scripts/python.exe" -m pip install --upgrade --no-warn-script-location -r "c:\Users\userName\.vscode\extensions\espressif.esp-idf-extension-1.4.0\esp_debug_adapter\requirements.txt"Looking in indexes: http://pypi.douban.com/simple/Ignoring typing: markers 'python_version < "3.5"' don't match your environmentRequirement already satisfied: setuptools>=21 in d:\software\espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from -r c:\Users\userName\.vscode\extensions\espressif.esp-idf-extension-1.4.0\esp_debug_adapter\requirements.txt (line 1)) (51.3.3)WARNING: The repository located at pypi.douban.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host pypi.douban.com'.Requirement already satisfied: click in d:\software\espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from -r c:\Users\userName\.vscode\extensions\espressif.esp-idf-extension-1.4.0\esp_debug_adapter\requirements.txt (line 3)) (8.1.3)WARNING: The repository located at pypi.douban.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host pypi.douban.com'.WARNING: The repository located at pypi.douban.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host pypi.douban.com'.ERROR: Could not find a version that satisfies the requirement psutil>=5.5.1 (from versions: none)ERROR: No matching distribution found for psutil>=5.5.1

错误中发现是命令执行发生的

"X:/Software/Espressif/python_env/idf4.3_py3.8_env/Scripts/python.exe" -m pip install --upgrade --no-warn-script-location -r "c:\Users\userName\.vscode\extensions\espressif.esp-idf-extension-1.4.0\esp_debug_adapter\requirements.txt"

看来应该是豆瓣源里没有这个资源, 于是更换一个阿里云源试试(若是其他的源也找不到那就再更换国内的其他源), 在刚才的命令行中运行以下命令,:

activate.bat"X:/Software/Espressif/python_env/idf4.3_py3.8_env/Scripts/python.exe" -m pip install --upgrade --no-warn-script-location -r "c:\Users\userName\.vscode\extensions\espressif.esp-idf-extension-1.4.0\esp_debug_adapter\requirements.txt" -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.comdeactivate.bat

以下是执行结果

Looking in indexes: http://mirrors.aliyun.com/pypi/simple/Ignoring typing: markers 'python_version < "3.5"' don't match your environmentRequirement already satisfied: setuptools>=21 in d:\software\espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from -r c:\Users\userName\.vscode\extensions\espressif.esp-idf-extension-1.4.0\esp_debug_adapter\requirements.txt (line 1)) (51.3.3)Collecting setuptools>=21  Downloading http://mirrors.aliyun.com/pypi/packages/3e/83/e206edff58159a927c76bbfeef1bf8b39cb12bbb32ae3c6227deb16d0121/setuptools-64.0.0-py3-none-any.whl (1.2 MB)     ---------------------------------------- 1.2/1.2 MB 1.2 MB/s eta 0:00:00Requirement already satisfied: click in d:\software\espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from -r c:\Users\userName\.vscode\extensions\espressif.esp-idf-extension-1.4.0\esp_debug_adapter\requirements.txt (line 3)) (8.1.3)Collecting psutil>=5.5.1  Downloading http://mirrors.aliyun.com/pypi/packages/b2/ad/65e2b2b97677f98d718388dc11b2a9d7f177ebbae5eef72547a32bc28911/psutil-5.9.1-cp38-cp38-win_amd64.whl (246 kB)     ---------------------------------------- 246.8/246.8 kB 1.2 MB/s eta 0:00:00Requirement already satisfied: pygdbmi<=0.9.0.2 in d:\software\espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from -r c:\Users\userName\.vscode\extensions\espressif.esp-idf-extension-1.4.0\esp_debug_adapter\requirements.txt (line 5)) (0.9.0.2)Collecting pywin32>=227  Downloading http://mirrors.aliyun.com/pypi/packages/4d/33/251aacef6d983476e4176e3c9b542f60c34735c034392e73762e699e9a5c/pywin32-304-cp38-cp38-win_amd64.whl (12.3 MB)     ---------------------------------------- 12.3/12.3 MB 1.3 MB/s eta 0:00:00Requirement already satisfied: requests>=2.21.0 in d:\software\espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from -r c:\Users\userName\.vscode\extensions\espressif.esp-idf-extension-1.4.0\esp_debug_adapter\requirements.txt (line 7)) (2.28.0)Collecting requests>=2.21.0  Downloading http://mirrors.aliyun.com/pypi/packages/ca/91/6d9b8ccacd0412c08820f72cebaa4f0c0441b5cda699c90f618b6f8a1b42/requests-2.28.1-py3-none-any.whl (62 kB)     ---------------------------------------- 62.8/62.8 kB 674.4 kB/s eta 0:00:00Collecting xmlrunner>=1.7.7  Downloading http://mirrors.aliyun.com/pypi/packages/57/c0/a19e29bc6038a56bb690549573af6ea11a9d2a5c07aff2e27ed308c2cab9/xmlrunner-1.7.7.tar.gz (5.6 kB)  Preparing metadata (setup.py) ... doneRequirement already satisfied: colorama in d:\software\espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from click->-r c:\Users\userName\.vscode\extensions\espressif.esp-idf-extension-1.4.0\esp_debug_adapter\requirements.txt (line 3)) (0.4.4)Requirement already satisfied: idna<4,>=2.5 in d:\software\espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from requests>=2.21.0->-r c:\Users\userName\.vscode\extensions\espressif.esp-idf-extension-1.4.0\esp_debug_adapter\requirements.txt (line 7)) (3.3)Requirement already satisfied: urllib3<1.27,>=1.21.1 in d:\software\espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from requests>=2.21.0->-r c:\Users\userName\.vscode\extensions\espressif.esp-idf-extension-1.4.0\esp_debug_adapter\requirements.txt (line 7)) (1.26.9)Requirement already satisfied: charset-normalizer<3,>=2 in d:\software\espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from requests>=2.21.0->-r c:\Users\userName\.vscode\extensions\espressif.esp-idf-extension-1.4.0\esp_debug_adapter\requirements.txt (line 7)) (2.0.12)Requirement already satisfied: certifi>=2017.4.17 in d:\software\espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from requests>=2.21.0->-r c:\Users\userName\.vscode\extensions\espressif.esp-idf-extension-1.4.0\esp_debug_adapter\requirements.txt (line 7)) (2022.5.18.1)Building wheels for collected packages: xmlrunner  Building wheel for xmlrunner (setup.py) ... done  Created wheel for xmlrunner: filename=xmlrunner-1.7.7-py3-none-any.whl size=6235 sha256=43b6fc21ec503430e530d65c7c473a647e0d36bfd062d3f02c2cf2317e84bc66  Stored in directory: c:\users\userName\appdata\local\pip\cache\wheels\60\ba\96\a2b8a41b87d4fd0c1a10371c90f2714cca6985c782b77cd44aSuccessfully built xmlrunnerInstalling collected packages: xmlrunner, pywin32, setuptools, requests, psutil  Attempting uninstall: setuptools    Found existing installation: setuptools 51.3.3    Uninstalling setuptools-51.3.3:      Successfully uninstalled setuptools-51.3.3  Attempting uninstall: requests    Found existing installation: requests 2.28.0    Uninstalling requests-2.28.0:      Successfully uninstalled requests-2.28.0Successfully installed psutil-5.9.1 pywin32-304 requests-2.28.1 setuptools-64.0.0 xmlrunner-1.7.7

看来是成功

重新打开VSCode , F1新建ESP IDF工程看看应该以及成功了

PS: 要取消换源使用以下命令

pip config unset global.index-url

设置阿里云源使用以下命令

pip config unset global.index-url http://mirrors.aliyun.com/pypi/simple/

来源地址:https://blog.csdn.net/zx2017_2_3/article/details/126304026

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

记录VSCode配置ESP IDF到最后python virtual environment 错误解决:

下载Word文档到电脑,方便收藏和打印~

下载Word文档

编程热搜

  • Python 学习之路 - Python
    一、安装Python34Windows在Python官网(https://www.python.org/downloads/)下载安装包并安装。Python的默认安装路径是:C:\Python34配置环境变量:【右键计算机】--》【属性】-
    Python 学习之路 - Python
  • chatgpt的中文全称是什么
    chatgpt的中文全称是生成型预训练变换模型。ChatGPT是什么ChatGPT是美国人工智能研究实验室OpenAI开发的一种全新聊天机器人模型,它能够通过学习和理解人类的语言来进行对话,还能根据聊天的上下文进行互动,并协助人类完成一系列
    chatgpt的中文全称是什么
  • C/C++中extern函数使用详解
  • C/C++可变参数的使用
    可变参数的使用方法远远不止以下几种,不过在C,C++中使用可变参数时要小心,在使用printf()等函数时传入的参数个数一定不能比前面的格式化字符串中的’%’符号个数少,否则会产生访问越界,运气不好的话还会导致程序崩溃
    C/C++可变参数的使用
  • css样式文件该放在哪里
  • php中数组下标必须是连续的吗
  • Python 3 教程
    Python 3 教程 Python 的 3.0 版本,常被称为 Python 3000,或简称 Py3k。相对于 Python 的早期版本,这是一个较大的升级。为了不带入过多的累赘,Python 3.0 在设计的时候没有考虑向下兼容。 Python
    Python 3 教程
  • Python pip包管理
    一、前言    在Python中, 安装第三方模块是通过 setuptools 这个工具完成的。 Python有两个封装了 setuptools的包管理工具: easy_install  和  pip , 目前官方推荐使用 pip。    
    Python pip包管理
  • ubuntu如何重新编译内核
  • 改善Java代码之慎用java动态编译

目录