PlatformIO installs all packages to “core_dir/packages” directory. You MUST HAVE write access to this folder. Please note that PlatformIO does not require “sudo”/administrative privileges.
A quick solution is to remove “core_dir/packages” folder and repeat installation/building/uploading again.
Some antivirus tools forbid programs to create files in the background. PlatformIO Package Manager does all work in the background: downloads package, unpacks archive in temporary folder and moves final files to “core_dir/packages” folder.
Antivirus tool can block PlatformIO, that is why you see “[Error 5] Access is denied”. Try to disable it for a while or add core_dir directory to exclusion/whitelist.
As we mentioned in “Solution 2”, antivirus tools can block background file system operations. Another solution is to run PlatformIO Core (CLI) from a system terminal.
Open System Terminal, on Windows cmd.exe
(not PlatformIO IDE Terminal)
Build a project and upload firmware using PlatformIO Core (CLI) which will download and install all dependent packages:
# Change directory to PlatformIO Project where is located "platformio.ini"
cd path/to/platformio/project
# Force PlatformIO to install PlatformIO Home dependencies
pio home
# Force PlatformIO to install toolchains
pio run --target upload
If “pio” command is not globally available in your environment and you use PlatformIO IDE, please use built-in PlatformIO Core (CLI) which is located in:
Windows: C:\Users\{username}\.platformio\penv\Scripts\platformio
Please replace {username}
with a real user name
Unix: ~/.platformio/penv/bin/platformio
Note
You can add platformio
and pio
commands to your system environment.
See Install Shell Commands.
Full warning message is “UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal”.
KNOWN ISSUE. Please move your project to a folder which full path does not contain non-ASCII chars.
KNOWN ISSUE. PlatformIO Core (CLI) currently does not support projects which contain non-ASCII characters (codes) in a full path or depend on the libraries which use non-ASCII characters in their names.
TEMPORARY SOLUTION
Use PlatformIO IDE, it will automatically install PlatformIO Core (CLI) in a root
of system disk (%DISK%/.platformio
) and avoid an issue when system
User contains non-ASCII characters
Do not use non-ASCII characters in project folder name or its parent folders.
Also, if you want to place PlatformIO Core (CLI) in own location, see:
Set PLATFORMIO_CORE_DIR
environment variable with own path
Configure custom location per project using core_dir option in “platformio.ini” (Project Configuration File).
Answered in issue #384.