最近使用vscode+platformIO开发esp32s3,第一次创建工程时加载速度很慢,查询资料解决问题,特此记录。
1.新建环境变量pyhton
此电脑-属性-高级系统设置中(直接搜索高级系统设置也行),添加系统变量:
变量名pyhton
变量值:C:\Users\“用户名”\.platformio\python3
需要改为个人用户名,在c盘用户文件夹下可以找到个人用户名
2.更换镜像源(1)
扩展列表中找到platformIO,点击齿轮,打开设置
点此
在括号末尾添加内容(用户名改为自己的):
"platformio-ide.customPATH": "C:\\Users\\[“用户名”]\\.platformio\\penv\\Scripts",
"platformio-ide.customPyPiIndexUrl": "https://mirrors.aliyun.com/pypi/simple/",
添加完成后:
3. 更换镜像源(2)
打开电脑中此位置文件:C:\Users\“用户名”\.platformio\penv
在pip文件,记事本打开
更改全部内容为:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple/
trusted-host = mirrors.aliyun.com
timeout = 6000
重启vscode,新建工程耐心等待,即可解决。