New User: VSCode pio command not found

New VSCode/PIO user here. Day 1. I ran into a problem when I tried to start installing libraries because the PIO command doesn’t exist according to the terminal. I’m opening the terminal from an arduino workspace /imported project.

I’ve gathered that there might be something going on with MS VSCode C++ Plugin or something to do with Python or something to do with AV Software.

I’ve tried:
disabled Real time scanning and firewall
uninstalled PIO and MS C++ plugins
Restarted VScode
Reinstalled PIO and it’s dependency

and PIO still seems to be missing. Like said it’s day 1 so other things could be missing that I don’t know are missing like a toolbar that I think I should see…

Do this screenshot tell you anything? Keep in mind I don’t even know what I don’t know so nothing is obvious to me. I would post more screenshots but as a new user my account is limited to 1…


I found my way here:

and tried downgrading PIO. I didn’t know how far back to downgrade so I went back to 2.1.0 and now I have a pio command.

I’m sure I don’t know what the real issue is but I sure hope someone sees this post so they don’t spend 4 hours being frustrated. I’m evaluating PIO vs Atmel Studio7/vMicro because PIO seems to be what the developers I’m hiring use. I just don’t know any better as to why this is better yet.

After reading about how it’s a bad idea to install libraries globally and that lib_deps in platformio.ini should be used instead I tried to compile thinking it would know what to do. It didn’t.

Next I went and tried to add the library I’m trying to use (tcMenu) to the project and I got this error:

PIO Core Call Error: “Library Storage: C:\Users\Westo\Documents\PlatformIO\Projects\201129-190546-seeed_wio_lite_mg126\.pio\libdeps\seeed_wio_lite_mg126\r\nLibrary Manager: tcMenu @ 1.7.0 is already installed\r\n\n\nError: Traceback (most recent call last):\r\n File "c:\users\westo\.platformio\penv\lib\site-packages\platformio\", line 109, in main\r\n cli() # pylint: disable=no-value-for-parameter\r\n File "c:\users\westo\.platformio\penv\lib\site-packages\click\", line 829, in call\r\n return self.main(*args, **kwargs)\r\n File "c:\users\westo\.platformio\penv\lib\site-packages\click\", line 782, in main\r\n rv = self.invoke(ctx)\r\n File "c:\users\westo\.platformio\penv\lib\site-packages\platformio\commands\", line 44, in invoke\r\n return super(PlatformioCLI, self).invoke(ctx)\r\n File "c:\users\westo\.platformio\penv\lib\site-packages\click\", line 1259, in invoke\r\n return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n File "c:\users\westo\.platformio\penv\lib\site-packages\click\", line 1259, in invoke\r\n return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n File "c:\users\westo\.platformio\penv\lib\site-packages\click\", line 1066, in invoke\r\n return ctx.invoke(self.callback, **ctx.params)\r\n File "c:\users\westo\.platformio\penv\lib\site-packages\click\", line 610, in invoke\r\n return callback(*args, **kwargs)\r\n File "c:\users\westo\.platformio\penv\lib\site-packages\click\", line 21, in new_func\r\n return f(get_current_context(), args, kwargs)\r\n File "c:\users\westo\.platformio\penv\lib\site-packages\platformio\commands\lib\", line 167, in lib_install\r\n _save_deps(ctx, installed_pkgs)\r\n File "c:\users\westo\.platformio\penv\lib\site-packages\platformio\commands\lib\", line 195, in _save_deps\r\n save_project_libdeps(input_dir, specs, project_environments, action=action)\r\n File "c:\users\westo\.platformio\penv\lib\site-packages\platformio\commands\lib\", line 87, in save_project_libdeps\r\n config.get("env:" + env, "lib_deps"), specs\r\n File "c:\users\westo\.platformio\penv\lib\site-packages\platformio\commands\lib\", line 59, in ignore_deps_by_specs\r\n depspec = PackageSpec(dep)\r\n File "c:\users\westo\.platformio\penv\lib\site-packages\platformio\package\", line 119, in init\r\n self._parse(raw)\r\n File "c:\users\westo\.platformio\penv\lib\site-packages\platformio\package\", line 222, in _parse\r\n raw = parser(raw)\r\n File "c:\users\westo\.platformio\penv\lib\site-packages\platformio\package\", line 245, in _parse_requirements\r\n self.requirements = tokens[1].strip()\r\n File "c:\users\westo\.platformio\penv\lib\site-packages\platformio\package\", line 162, in requirements\r\n else semantic_version.SimpleSpec(str(value))\r\n File "c:\users\westo\.platformio\penv\lib\site-packages\semantic_version\", line 618, in init\r\n self.clause = self._parse_to_clause(expression)\r\n File "c:\users\westo\.platformio\penv\lib\site-packages\semantic_version\", line 1014, in _parse_to_clause\r\n return cls.Parser.parse(expression)\r\n File "c:\users\westo\.platformio\penv\lib\site-packages\semantic_version\", line 1034, in parse\r\n raise ValueError("Invalid simple block %r" % block)\r\nValueError: Invalid simple block ‘’\r\n\r\n============================================================\r\n\r\nAn unexpected error occurred. Further steps:\r\n\r\n Verify that you have the latest version of PlatformIO using\r\n pip install -U platformio command\r\n\r\n Try to find answer in FAQ Troubleshooting section\r\n\r\n\r\n Report this problem to the developers\r\n\r\n\r\n============================================================

I know this probably has more to do with that library and it’s dependencies than with PIO in general but it illustrates the fact that using an old version of PIO isn’t an option. I’m done for the day.

That error usually appears when the project contains a platformio.ini with invalid lib_deps declaration, like libraryname@commithash.

Are you able to create a simple test project, e.g. for Atmel AVR + Uno + Arduino?

Well then…

platform = atmelsam
board = seeed_wio_lite_mg126
framework = arduino
lib_deps = davetcc/tcMenu @ ^1.7.0, davetcc/TaskManagerIO @ ^1.0.4, davetcc/IoAbstraction @ ^1.6.4, adafruit/Adafruit GFX Library @ ^1.10.3,

I don’t know how you went from that error to knowing exactly where to look (besides lots of experience) but the .ini file has a trailing comma.

I sincerely appreciate you taking the time to let me know where to look. Thank you.

1 Like

Python has this habit of putting the most likely culprit for an error at the end of the log… i.e. as the last exception. There are always exceptions to the rule… but it is often the case. :wink:

1 Like