Pip installs to wrong location while using VSCode

I am currently using VSCode for python3 projects. After installing PlatformIO all pip package installs now install to the .platformio python2 directory, not the standard python3 directory. I have tries to find a setting or command to change the install path but have not had any luck.

Thanks for the help,


How did you install PlatformIO? What commands did you run? And what OS are you on?


I am on a Dell Latitude 5591 running windows 10. I originally installed VSCode than python 3.7. I have an Arduino component to my work project and started to look for a better IDE and came across platformio. I installed it using the extension options built into VSCode. After the instillation I would try to use the pip install command from the terminal in VScode and it is all routed to the .platformio python 2 install instead of the standard python 3 install that it was using before. I set my python interpeter to python 3.7, but it still uses the platformio pip anyway.

I am using Ubuntu, and I see the very same issue. I don’t know that it ends up being a real problem, because I can still use the things pip installs. It is just a strange place to go looking for your pip installed functions, and you might be tempted to remove .platformio for other reasons and destroy your pip installs inadvertently.

it seems I do have the same problem now using ubunu 1804.
After installing platformIO extension in vscode it somewhat took over vscode python environment even in non-platformIO projects. This leads to the problem that other project do not find their python packages anymore as those are for good reason not part of the platformIO-python-environment.
Any ideas how I can solve this problem mixing?

We use PlatformIO Core installation script Redirecting...
It installs PlatformIO Core into the isolated Python environment. You can remove %HOMEDIR%/.platformio/penv folder and re-run this script manually. It will look for Python 3 by default.

1 Like

This is a pathetic answer! How am I supposed to know WHICH script I should select on the link? THere are a myriad of instructions on that link. I find it unacceptable that platform_io is hogging all the python projects on VSCode! Do you own VSCode?

I just want platform_io to leave my normal projects alone! If I want to use platform_io, I will load it specifically.
So what exactly should I do in order to get rid of this nuisance?

Do you mean this PlatformIO IDE for VSCode — PlatformIO latest documentation?