Since the recent platform IO and visual studio release and update multiple users in my class are having trouble - getting errors saying that it cannot communicate with python or that the path environment has changed since the install. So far i have only been able to find that uninstalling platform IO, then restarting and reinstalling is a solution. I am wondering if you know of any other solutions.
- Exact error message?
- What version of VSCode used?
- What version of PlatformIO core used?
- What extension version of PlatformIO used?
- Target operating system?
Exact error message? 2 errors occurred on one of the students computer.
(1) Missing Python exe and
(2)Virtual environment error.
The first one occurred a couple days ago. The second error occurred last night. We arent really sure if it occurred as a result of an update.
What version of VSCode used? 1.39.2
What version of PlatformIO core used? 4.0.3
What extension version of PlatformIO used? 2.3.3
Target operating system? Windows 10
Here is the exact error message:
Error: Could not create PIO Core Virtual Environment. Please create it manually -> http://bit.ly/pio-core-virtualenv Error: Virtualenv Create: Traceback (most recent call last): File "C:\Users\jjpal\.platformio\.cache\tmp-11776v7dziOb3Jls4\virtualenv-16.7.5\virtualenv.py", line 2632, in <module> main() File "C:\Users\jjpal\.platformio\.cache\tmp-11776v7dziOb3Jls4\virtualenv-16.7.5\virtualenv.py", line 860, in main create_environment( File "C:\Users\jjpal\.platformio\.cache\tmp-11776v7dziOb3Jls4\virtualenv-16.7.5\virtualenv.py", line 1156, in create_environment install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages=site_packages, clear=clear, symlink=symlink) File "C:\Users\jjpal\.platformio\.cache\tmp-11776v7dziOb3Jls4\virtualenv-16.7.5\virtualenv.py", line 1526, in install_python shutil.copyfile(executable, py_executable) File "C:\Users\jjpal\AppData\Local\Programs\Python\Python38-32\lib\shutil.py", line 259, in copyfile with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst: PermissionError: [Errno 13] Permission denied: 'C:\\Users\\jjpal\\.platformio\\penv\\Scripts\\python.exe'
Using base prefix 'C:\\Users\\jjpal\\AppData\\Local\\Programs\\Python\\Python38-32' New python executable in C:\Users\jjpal\.platformio\penv\Scripts\python.exe at t.value (c:\Users\jjpal\.vscode\extensions\platformio.platformio-ide-1.9.2\node_modules\platformio-node-helpers\dist\index.js:1:32251)
Here is what was given as a temporary solution from GitHub forum
They said to just restart machine or kill python.exe
This PermissionError: [Error 13]: #1213 applies only to Windows. At this point, one can also close visual studio, restart the windows computer Platform IO installation resumes automatically when visual studio code is started.
IDE 1.9.2 installed nicely on Linux Deepin 15 and Mint 18. Minor issue #1213 on Windows.
Python 3.8 seems to be required, older ones do not work.
Running pio update from terminal might be also be necessary, I saw this mentioned several times, but for me it just reports all good.
The Issues · platformio/platformio-vscode-ide · GitHub might be the best place to find information about current PlatformIO IDE related issues and solutions.