PlatformIO Community

Space in user name in file path causes error

When attempting to build AWS Edu-kit Getting Started Blink app, I get the following error:

C:\Users\Steven Stark.platformio\penv\Scripts\python.exe -m pip install “cryptography>=2.1.4” “uture>=0.15.2” “pyparsing>=2.0.3,<2.4.0”
‘C:\Users\Steven’ is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Steven Stark.platformio\penv\Scripts\python.exe -m pip install “file://C:.PIO\package\framework-espidf/tools/kconfig_new/esp-windows-curses” windows-curses
*** Error 1
‘C:\Users\Steven’ is not recognized as an internal or external command,
operable program or batch file.
*** Error 1

Note that I have inserted the line “core_dir = C:\.PIO” to the platformio.ini file for the project.

The problem is caused by the white space between the first and last user names in the Python install file path.

I cannot find any way to get around this problem!! Any help would be appreciated.

With what exact platformio.ini is that?

I’m also facing the same issue. Seems this is still a problem.
Using platformio Core 6.1.5, targeting Teensy (4.17.0).

I was able to find a hack to get around this though, even without fixing the source of it.
Basically, for the Python packages PIO is trying to install, you can simply install them yourself manually. You can do this by:

  1. Running pio -v in your root project directory
  2. Identify which packages need to be installed. For my case, I needed protobuf>=3.19.1 and grpcio-tools>=1.43.0, and you’ll see in the verbose mode the lines where pio tries to install them after running the LDF (library dependency finder)
  3. Run the python installations yourself in a terminal window. Make sure you use the python path of PIO (i.e. C:\Users\**User Name**\.platformio\penv\Scripts\python.exe or something similar. The compilation output will show the path if you aren’t sure).
  4. Run pio -v again, and because the packages are already installed, it shouldn’t fail.

Hope this helps someone.

It seems that you use outdated ESP-IDF in PlatformIO. This issue was fixed before, see platform-espressif32/ at develop · platformio/platform-espressif32 · GitHub