Missing tool-cppcheck core package

Getting this error while running. I checked platformio manifest.json and it seems version 1.190 is missing for windows.

> pio check --verbose
CorePackageManager: Installing tool-cppcheck @ ~1.190.0
Error: Could not find a version that satisfies the requirement '~1.190.0' for your system 'windows_x86'

Huh? It’s there in the manifest, and the file is on bintray… maybe your system isn’t being picked up as a x64 Windows platform, or your machine has an outdated cache?

I just removed the package on my Windows 10 box, and it reinstalled fine…

I dont know why but my system is recognized as x86 even though I am running x64 windows :confused:
1.190 is missing for windows_x86 :slight_smile: to be precise.

Hm… maybe it’s the same problem I was having with simavr before… I’m on x64 also, but for some reason simavr wasn’t an install candidate with just windows_amd64 as a compatible system.

Can you humour me, and double check from a PlatformIO terminal what version of python PlatformIO is using i.e. python --version … I’m now on 3.7.7 as that’s what the PlatformIO installer is using on Windows now. PlatformIO uses venv so may use a different version to your system version of python.

it says Python 3.8.1
I opened up terminal from bottom, is that right?
image

In another VScode window where I am working on my platformio files python is 32-bit, maybe thats the problem?
image

Yup, via the icon down the bottom. It’s possible… I *think if python is already present on the system, PlatformIO will try to use that… don’t quote me on that though… :wink:

Do you feel game to remove that version of python, and (I’m guessing via the MS Python extension in VSCode, removing/moving %userprofile%\.platformio\penv and letting PlatformIO reinstall, hopefully with it’s own self-contained python package? If it does, you should be able to install the Python extension again, hopefully without it interfering.

I might install it my side since I am starting to play with Python, and see if I can break something! :rofl:

I did not do exactly what you suggested, but I removed system installed python3 32-bit, Installed python 3 64-bit. Then deleted penv folder and let pio install itself again. Reload and… voila

CorePackageManager: Installing tool-cppcheck @ ~1.190.0
Downloading  [####################################]  100%
tool-cppcheck @ 1.190.0 has been successfully installed!

I think if pio has its own python, then it should not depend on system installed python as it may cause unwanted issues like the one I had.

1 Like

I was in the process of changing tack… there, but you beat me to it.

I think the problem might actually be the Python VSCode extension itself… I actually had it installed, but disabled, and when I renabled it, it straight away jumped to to Python 3.7.7. I don’t have a system version installed - this is the version used/provided by PlatformIO. And when I click on it, it lets me change from that, to another version. So perhaps it is overriding PlatformIO’s interpreter?

image

Oh, and I like how it thinks the current version is in C:\python37\ … it was, but it’s long gone!

For me current interpreter is pio’s python

But I am not sure why you have a 3.7.7 where as I have 3.8.3 if pio has its own interpreter :thinking:
Shouldn’t we have the same versions in penv?

Hm… maybe PlatformIO does use the system version then if present (on windows), otherwise installs it’s own specific version (3.7.5 for the stable VSCode extension, or 3.7.7 for the 2.0.x beta). That is indeed problematic.

Since I’m running the 2.0.0 beta of the VSCode extension, which installs python differently, I’ve install python 3.8 (3.8.3 x64) via the windows store, and have moved my penv folder, to see what happens… as I think this is one aspect it is trying to fix by using the universal installer script.

And yes, it does appear to install completely independently now… I have a system level 3.8.3 x64 python, but PlatformIO still went ahead and installed it’s own 3.7.7 python environment, so it should be completely isolated now (and is ignoring the Python extension also, which is good to know).

I believe for a unified experience its important and this should be the default behavior as user might have installed a different version of python for its own testing or development. Version mismatch will surprisingly cause issues like the one you had yesterday when you were running python2 and today I was running 32-bit version of python3.

1 Like

True. My case was a little different, as I’d been running that install for well over six months, and when I installed PlatformIO then, it was using python2.7. But yes, it has caused issues, which is why Ivan’s trying to get it standardised using the minimal python environment as a base.

1 Like