PlatformIO Community

Install platformio in different folder on Linux

I’m creating a jenkins docker image that contains platformio intallation. By default the installation is run as user jenkins and this will install platformio in /var/jenkins_home/.platformio.

But when running a jenkins container the /var/jenkins_home folder is usually bound to an external volume which will of course hide the original folder in the image.

Is it possible to have get-platformio.py install platformio in a configurable folder?

@ivankravets I think you should have a look at that question

1 Like

You need https://docs.platformio.org/en/latest/envvars.html#envvar-PLATFORMIO_CORE_DIR

Happy coding with PlatformIO!

So do I understand correctly that you first set PLATFORM_CORE_DIR env variable and then call python get-platformio.py ?

I tried it but it doesn’t work, its still installed in /var/jenkins_home

Hi,

I’m also interesting to specify install directory but on Windows10.
Especially because i’m using esp-idf which doesn’t accept spaces in build names.
I have a space in my windows user directory and cannot change it as i’m not an administrator.
I have also tried the core dir option in my platformio.ini file of the corresponding project but pio is still launch from “c:\users<username with space>.platformio\penv\scripts\python.exe”

I tried to manually move the whole directory in an another place and then change my PATH settings to point on the new folder but the command line python get-platformio.py check core doesn’t detect anymore platformio.

It seems that the install folder cannot be changed.

Nobody that can shed some light on this?

I guess you’ve found a solution by now, but for others surfing here:

After setting PLATFORMIO_CORE_DIR the install goes into the correct directory for me (on Ubuntu 22.04, for example):

python3 -c "$(wget -O - https://raw.githubusercontent.com/platformio/platformio/master/scripts/get-platformio.py)"
1 Like