question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

platform-espressif cannot satisfy python requirement for pyparsing >=2.0.3,<2.4.0

See original GitHub issue

Synopsis

On ArchLinux and NixOS, the system package manager installs pyparsing-2.4.7. The espidf framework is unable to install an appropriate version of pyparsing. One user posted on the PlatformIO forum they tried to use venv to construct a python environment with an older version of pyparsing to no avail [1].

Are there any work arounds for this issue? My searches yielded few relevant results.

This error effectively makes platformio useless for my ESP32-related development. Would it make sense to incorporate patches that support pyparsing >2.4.0 in platform-espressif?

[1]: https://community.platformio.org/t/espressif32-python-dependencies/15839

Details

In a new, empty platformio project, I’ve set the following settings…

; platformio.ini

[env:usb]
board = esp32cam
platform = espressif32@^2.1.0
; platform = https://github.com/platformio/platform-espressif32.git
framework = espidf
lib_deps = espressif/esp32-camera@^1.0.0

…and when I run pio run, I find the following error:

# Snipped relevant section
The following Python requirements are not satisfied:
pyparsing>=2.0.3,<2.4.0
$ pio run
Processing usb (board: esp32cam; platform: espressif32@^2.1.0; framework: espidf)
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32cam.html
PLATFORM: Espressif 32 (2.1.0) > AI Thinker ESP32-CAM
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-espidf 3.40100.200827 (4.1.0)
 - tool-cmake 3.16.4
 - tool-esptoolpy 1.30000.201119 (3.0.0)
 - tool-ninja 1.7.1
 - toolchain-esp32ulp 1.22851.191205 (2.28.51)
 - toolchain-xtensa32 2.80200.200827 (8.2.0)
Reading CMake configuration...
-- Found Git: /usr/bin/git (found version "2.30.0")
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/devuser/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/devuser/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/devuser/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/devuser/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-g++
-- Check for working CXX compiler: /home/devuser/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Project version: 4d8b3c9
-- Building ESP-IDF components for target esp32
-- Checking Python dependencies...
The following Python requirements are not satisfied:
pyparsing>=2.0.3,<2.4.0
Please follow the instructions found in the "Set up the tools" section of ESP-IDF Getting Started Guide
-- Configuring incomplete, errors occurred!
See also "/home/devuser/files/development/embedded/esp-cam/.pio/build/usb/CMakeFiles/CMakeOutput.log".

fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
CMake Error at /home/devuser/.platformio/packages/framework-espidf/tools/cmake/build.cmake:271 (message):
  Some Python dependencies must be installed.  Check above message for
  details.
Call Stack (most recent call first):
  /home/devuser/.platformio/packages/framework-espidf/tools/cmake/build.cmake:397 (__build_check_python)
  /home/devuser/.platformio/packages/framework-espidf/tools/cmake/project.cmake:396 (idf_build_process)
  CMakeLists.txt:3 (project)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
valeroscommented, Jan 5, 2021

You can use a universal installation script https://docs.platformio.org/en/latest/core/installation.html?highlight=virtual#step-2-install-platformio-core, so no need to mess with Docker.

0reactions
boxofroxcommented, Jan 7, 2021

@veleros Can confirm that the universal installation script was able to provide an isolated python + PlatformIO, and the espressif platform installed pyparsing-2.3.1_ and compiled an “empty”/new project successfully.

FYI to anyone else searching for a solution.

  • The universal installation script reinstalled PlatformIO under /home/user/.platformio/penv.
  • When opening a new shell, run source ~/.platformio/penv/bin/activate (or add this command to your .bashrc, etc) to configure the environment to run the isolated python + platformio.
  • Setup a new PlatformIO project with a platformio.ini similar to OP, and pio run will download esp-idf, install dependencies, and compile!
Read more comments on GitHub >

github_iconTop Results From Across the Web

can't install pyparsing==2.4.1 · Issue #106 - GitHub
Dear all, I can't install pyparsing 2.4.1 by pip: ###pip install ... find a version that satisfies the requirement pyparsing===2.4.1 (from ...
Read more >
matplotlib requires pyparsing - python - Stack Overflow
I installed pyparsing using easy_install pyparsing , but the error keeps appearing. How can I solve this problem? Alternatively, is there any alternative...
Read more >
pyparsing - PyPI
The pyparsing module provides a library of classes that client code uses to construct the grammar directly in Python code.
Read more >
The following Python requirements are not satisfied: pyparsing ...
After pull the latest esp-idf, I'm fail to make project. The following Python requirements are not satisfied: pyparsing>=2.0.3,<2.4.0.
Read more >
Python deployment fails with "packaging 21.2 has requirement ...
Manually installing pyparsing 2.4.7 has been reported to work. I released pyparsing 3.0.6 today, in which I try to accommodate the issues in ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found