Failed to compile can't find .py files

Hi I’m running into this error when I try to compile a platformio project

FileNotFoundError: [WinError 2] The system cannot find the file specified:
File “C:\users\user.platformio\penv\lib\site-packages\platformio\builder\main.py”, line 177:
env.SConscript("$BUILD_SCRIPT")
File “C:\Users\user.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Script\SConscript.py”, line 591:
return _SConscript(self.fs, *files, **subst_kw)
File “C:\Users\user.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Script\SConscript.py”, line 280:
exec(compile(scriptdata, scriptname, ‘exec’), call_stack[-1].globals)
File “C:\users\user.platformio\platforms\atmelsam\builder\main.py”, line 128:
target_elf = env.BuildProgram()
File “C:\Users\user.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Util.py”, line 658:
return self.method(*nargs, **kwargs)
File “C:\users\user.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py”, line 62:
env.ProcessProjectDeps()
File “C:\Users\user.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Util.py”, line 658:
return self.method(*nargs, **kwargs)
File “C:\users\user.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py”, line 140:
project_lib_builder = env.ConfigureProjectLibBuilder()
File “C:\Users\user.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Util.py”, line 658:
return self.method(*nargs, **kwargs)
File “C:\users\user.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py”, line 1062:
project.install_dependencies()
File “C:\users\user.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py”, line 898:
lm.install(spec)
File “c:\users\user.platformio\penv\lib\site-packages\platformio\package\manager_install.py”, line 49:
spec, silent=silent, skip_dependencies=skip_dependencies, force=force
File “c:\users\user.platformio\penv\lib\site-packages\platformio\package\manager\library.py”, line 86:
force=force,
File “c:\users\user.platformio\penv\lib\site-packages\platformio\package\manager_install.py”, line 97:
pkg = self.install_from_url(spec.url, spec, silent=silent)
File “c:\users\user.platformio\penv\lib\site-packages\platformio\package\manager_install.py”, line 141:
vcs = VCSClientFactory.new(tmp_dir, url)
File “c:\users\user.platformio\penv\lib\site-packages\platformio\package\vcsclient.py”, line 55:
src_dir, remote_url, tag, silent
File “c:\users\user.platformio\penv\lib\site-packages\platformio\package\vcsclient.py”, line 137:
self.configure()
File “c:\users\user.platformio\penv\lib\site-packages\platformio\package\vcsclient.py”, line 146:
result = proc.exec_command([cls.command, “–exec-path”])
File “c:\users\user.platformio\penv\lib\site-packages\platformio\proc.py”, line 117:
p = subprocess.Popen(*args, **kwargs)
File “C:\Users\user.platformio\python3\lib\subprocess.py”, line 800:
restore_signals, start_new_session)
File “C:\Users\user.platformio\python3\lib\subprocess.py”, line 1207:
startupinfo)

Is it some special project? What’s the platformio.ini? Or does this occur with the simplest Arduino Uno blink sketches as well?

Hallo, I got exactly the same error while compiling the 3d Printer Software marlin with the integrated ESP3d feature activated for an ESPWROOM32. Without that feature the code compiles without errors!

!

Do you have Git installed globally on your computer and restarted VSCode? The linked repository GitHub - luc-github/ESP3DLib: ESP3D library for Marlin and ESP32 boards exists so that part shouldn’t be a problem.

@gordonswanson is there a line above that error message refering to some URL?

1 Like

I installed Git real quick and now it works flawless!
Thank You very much.

Thank you so much! It’s helped me too!