Arduino Python dependencies?

Hi All,

I was doing some ESP32 experiments the other day and I recall changing my Platformio.ini, as advised by the creator of a project.

I think it was the framework-arduinoespressif32-libs @ 5.4.0+sha.2f7dcd862a

shown below.

I got a bit lost and those experiments didn’t go well, so I’ve reverted back to my original project.

However, I’m now getting compiler errors, as below ….

PACKAGES:
 - framework-arduinoespressif32 @ 3.2.0
 - framework-arduinoespressif32-libs @ 5.4.0+sha.2f7dcd862a
 - tool-esptoolpy @ 4.8.9
 - tool-mkfatfs @ 2.0.1
 - tool-mklittlefs @ 3.2.0
 - tool-mkspiffs @ 2.230.0 (2.30)
 - tool-riscv32-esp-elf-gdb @ 14.2.0+20240403
 - tool-xtensa-esp-elf-gdb @ 14.2.0+20240403
 - toolchain-xtensa-esp-elf @ 14.2.0+20241119
Installing Arduino Python dependencies
Collecting wheel>=0.35.1Using cached wheel-0.42.0-py3-none-any.whl.metadata (2.2 kB)
Collecting rich-click>=1.8.6Using cached rich_click-1.8.9-py3-none-any.whl.metadata (7.9 kB)
ERROR: Ignored the following yanked versions: 6.0.2rc1
ERROR: Ignored the following versions that require a different python version: 0.43.0 Requires-Python >=3.8; 0.44.0 Requires-Python >=3.8; 0.45.0 Requires-Python >=3.8; 0.45.1 Requires-Python >=3.8; 0.46.0 Requires-Python >=3.9; 0.46.1 Requires-Python >=3.9; 1.9.0 Requires-Python >=3.8; 1.9.0.dev0 Requires-Python >=3.8; 1.9.0.dev1 Requires-Python >=3.8; 1.9.0.dev2 Requires-Python >=3.8; 1.9.0.dev3 Requires-Python >=3.8; 1.9.0.dev4 Requires-Python >=3.8; 1.9.0.dev5 Requires-Python >=3.8; 1.9.0.dev6 Requires-Python >=3.8; 1.9.1 Requires-Python >=3.8; 6.0.2 Requires-Python >=3.8; 6.0.3 Requires-Python >=3.8
ERROR: Could not find a version that satisfies the requirement PyYAML>=6.0.2 (from versions: 3.10, 3.11, 3.12, 3.13b1, 3.13rc1, 3.13, 4.2b1, 4.2b2, 4.2b4, 5.1b1, 5.1b3, 5.1b5, 5.1, 5.1.1, 5.1.2, 5.2b1, 5.2, 5.3b1, 5.3, 5.3.1, 5.4b1, 5.4b2, 5.4, 5.4.1, 6.0b1, 6.0, 6.0.1)
ERROR: No matching distribution found for PyYAML>=6.0.2*** Error 1

My old project compiles OK, but the section above takes several seconds to get through and is becoming annoying now. Any way to get rid of whatever this is ?

Thank you

Trevor

Does that happen with the latest

platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.31/platform-espressif32.zip

too?

Hi Max,

I’m on an old Win 7 version, will that work ?

I guess I just replace platform = espressif32 ??

Trevor

Yes, you’d have to replace that line.

No Idea if Windows 7 (I hope at least 64-bit) will work, you have to try it out. You can revert to an older version anytime anyways.

HI Max,

Will not compile now …..

Resolving nodemcu-32s dependencies…
Git not found in PATH, please install Git.
Git is needed for Platform espressif32 to work.

Not seen this before

Trevor

Git is a documented requirement of PIO Arduino.

https://github.com/pioarduino/platform-espressif32?tab=readme-ov-file#ide-preparation
https://git-scm.com/downloads

Oh dear,

VSCode won’t load any of my projects now, hundreds of compile errors.

Going to start fresh with complete re-install from scratch.

Trevor

So, in a few hours I’ve gone from getting on pretty well with several working ESP32 projects, to a situation now where Platformio just doesn’t work anymore.

I’ve done a complete re-install of VSCode. Even building projects that worked the other day, I get the following errors …

Processing nodemcu-32s (platform: espressif32; board: nodemcu-32s; framework: arduino)
Tool Manager: Installing platformio/tool-esptoolpy @ ~2.40900.0Unpacking  [####################################]  100%Collecting cryptography~=45.0.3Using cached cryptography-45.0.7-cp37-abi3-win_amd64.whl.metadata (5.7 kB)Collecting ecdsa~=0.19.1Using cached ecdsa-0.19.1-py2.py3-none-any.whl.metadata (29 kB)
ERROR: Ignored the following yanked versions: 3.1.8, 4.0.0b1
ERROR: Ignored the following versions that require a different python version: 4.2.0 Requires-Python >=3.8; 4.2.0b1 Requires-Python >=3.8; 4.2.0b2 Requires-Python >=3.8; 4.2.1 Requires-Python=3.8; 4.2.2 Requires-Python >=3.8; 4.2.3 Requires-Python >=3.8; 4.3.0 Requires-Python >=3.8; 4.3.1 Requires-Python >=3.8; 46.0.0 Requires-Python !=3.9.0,!=3.9.1,>=3.8; 46.0.1 Requires-Python!=3.9.0,!=3.9.1,>=3.8; 46.0.2 Requires-Python !=3.9.0,!=3.9.1,>=3.8
ERROR: Could not find a version that satisfies the requirement bitstring~=4.3.1 (from versions: 0.3.2, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.5.1, 0.5.2, 1.0.0, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.2.0, 1.3.0, 2.0.0b1, 2.0.1b2, 2.0.2, 2.0.3, 2.1.0, 2.1.1, 2.2.0, 3.0.0, 3.0.1, 3.0.2, 3.1.0, 3.1.1, 3.1.2, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.9, 4.0.0b3, 4.0.0, 4.0.1, 4.0.2, 4.1.0b1, 4.1.0, 4.1.1,4.1.2, 4.1.3, 4.1.4)
ERROR: No matching distribution found for bitstring~=4.3.1

Command ‘[‘C:\Users\Trev\.platformio\penv\Scripts\python.exe’, ‘-m’, ‘pip’, ‘install’, ‘–no-compile’, ‘-t’, ‘C:\Users\Trev\.platformio\packages\tool-esptoolpy\_contrib’, ‘cryptography ~= 45.0.3’, ‘ecdsa ~= 0.19.1’, ‘bitstring ~= 4.3.1’, ‘reedsolo ~= 1.7.0’, ‘intelhex ~= 2.3.0’]’ returned non-zero exit status 1.
Cleaning…Tool Manager: tool-esptoolpy@2.40900.250804 has been installed!
MissingPackageManifestError: Could not find one of ‘package.json’ manifest files in the package

Any help please ?

Is this using an ancient Python version or what – that should not be happening. On the PlatformIO Core CLI, what’s the output of

pio system info

?

Hi Max, can’t find anything in PIO, also did a bit of Google, but still not sure how to get

“pio system info” ??

Hi Max, I tried to start a new project … “Project name, NodeMCU-32S, Arduino, my location. Got PIO erro box…

Could not initialize project
PIO Core Call Error: "The following files/directories have been created in 
D:\\2D - Trevs Design stuff\\ESP32 Wroom WIFI stuff\\Trevs ESP32\r\ninclude
 - Put project header files here\r\nlib - Put project specific (private) 
libraries here\r\nsrc - Put project source files here\r\nplatformio.ini 
- Project Configuration File\r\nResolving nodemcu-32s dependencies...
\r\n\n\nMissingPackageManifestError: Could not find one of 
'package.json' manifest files in the package"

I’m up and running again !

A bit drastic but … I’ve gone from Win 7 to Win 10 on a new hard drive SSD, installed latest VSCode, Platformio, etc.

Might still try my old Win 7 SSD one day to see what happened.

One point, Win 10 doesn’t recognise the ESP32 as a Com port (does show up as a “device” in Device manager), but installing SP2101 drivers sorted that out.

Works OK now

Thank you Max for your time !

When interacting with an Arduino board from Python, the primary dependency is the pyserial library. This library provides the functionality to establish and manage serial communication between your Python script and the Arduino.