platformio-vscode-ide
platformio-vscode-ide copied to clipboard
PermissionError: [Errno 13] Permission denied
Temporary solution
- Please check that antivirus tools do not block PlatformIO installer
- Try to kill all
python.exe
processes and restart VSCode.
Restart VSCode.
%23 Description of problem Leave a comment...
BEFORE SUBMITTING, PLEASE SEARCH FOR DUPLICATES IN
- https://github.com/platformio/platformio-vscode-ide/issues
%23 Configuration
VSCode: 1.39.2 PIO IDE: v1.9.2 System: Windows_NT, 10.0.17763, x64
%23 Exception
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\Gus\.platformio\.cache\tmp-131728a1FlsIuAE0A\virtualenv-16.7.5\virtualenv.py", line 2632, in <module>
main()
File "C:\Users\Gus\.platformio\.cache\tmp-131728a1FlsIuAE0A\virtualenv-16.7.5\virtualenv.py", line 870, in main
symlink=options.symlink,
File "C:\Users\Gus\.platformio\.cache\tmp-131728a1FlsIuAE0A\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\Gus\.platformio\.cache\tmp-131728a1FlsIuAE0A\virtualenv-16.7.5\virtualenv.py", line 1526, in install_python
shutil.copyfile(executable, py_executable)
File "C:\Users\Gus\.platformio\python37\lib\shutil.py", line 121, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Gus\\.platformio\\penv\\Scripts\\python.exe'
Using base prefix 'C:\\Users\\Gus\\.platformio\\python37'
New python executable in C:\Users\Gus\.platformio\penv\Scripts\python.exe
at t.value (c:\Users\Gus\.vscode\extensions\platformio.platformio-ide-1.9.2\node_modules\platformio-node-helpers\dist\index.js:1:32251)
Do you use Antivirus tools in a system?
Machine reboot fixed it for me. https://github.com/platformio/platformio-vscode-ide/issues/1216
I uninstalled vscode, uninstalled all python versions I had installed, rebooted my pc, and reinstalled vscode, on first launch it downloaded platformio and all worked then,
Ok.
On an interesting note. For me, this was caused by a file being set with admin privileges. This was not by me so somehow the IDE set the file to admin... After copying out the file and then back in the error went away.
I removed my virtualenv folder in the project itself but my VSC settings where still pointing to the executable of python which i threw away. After selecting the system python version I could create my venv again.
Hi,
Thanks for the report! We rewrote PlatformIO Core installer from the scratch. Please download and install the latest PlatformIO IDE for VSCode 2.0 Beta as described in Try Beta section on that page.
Please respond to this thread if it helped you or you still have an issue. We will reopen this issue again.
Regards, Your friends at PlatformIO
Hi I still have this issue. Tried to reinstall Visual Studio code + Platformio. But the issue is still there. regards Waldemar