How integrate external personal .zip libraries

Hello everyone. In the previous version of PlatformIO, was an option at library menu that calls “install” which allows to install our external .zip libraries. It was great, because it made so so easy import libraries

But it disappeared with the update.

How I can install that libraries now? Where is that action button now?

Thanks a lot

I think the removal of that button is deliberate to push users to use the correct library management, that is, per-project managements via lib_deps instead of global libraries, which bring a bunch of problems with them (@ivankravets correct me if I’m wrong). So I strongly recommend that you use the intended PlatformIO library management system, which is already so easy by searching for the library you want and adding it via the “Add to Project” button.


Installing global libraries is still possible (but unrecommended) via the commandline. Open a PlatformIO CLI and execute the command

pio lib -g install path_to_zip_file


pio lib -g install "C:\Users\Max\Downloads\"

Ok, thats fine… There are any ways to implemets my external libraries “C:/…” by command line BUT as local and no like global?

My problem isn’t with local or global (I think that is better as now), my problem is at time to integrate my own .zip libraries. If I could implemets my own external libraries as local I would like know it :grinning:

Omitting the -g (=--global) will install the library in the local project storage and modify your platformio.ini to include the path ot that library.


pio lib install C:\Users\Max\Downloads\
>pio lib install C:\Users\Max\Downloads\
Library Storage: C:\Users\Max\Documents\PlatformIO\Projects\atmel_hello\.pio\libdeps\uno
Library Manager: Installing file://C:\Users\Max\Downloads\
Library Manager: Adafruit GFX Library @ 1.10.3 has been installed!
Library Manager: Installing dependencies...
Library Manager: Installing Adafruit BusIO
Library Manager: Adafruit BusIO @ 1.6.0 has been installed!

platformio.ini before

platform = atmelavr
board = uno
framework = arduino


platform = atmelavr
board = uno
framework = arduino
lib_deps = C:\Users\Max\Downloads\

You see that that command line is just a fancy way of using the lib_deps directive as I have already linked with its documentation above – have a read through that, please.

You can also use the lib_extra_dirs option if you just want to point to an existing library folder on disk.

1 Like

And… You are running CLI instruction from project’s windows (terminal with project open)

1 Like

Exactly, the pio install commands will use the current directory and check for a PlatformIO project there.

I must use platformio lib install ... , doesn’t work with pio lib install ....

Hey - new here. I just ran this script and it worked as expected.(thanks) I’m hoping you can tell me where to go to learn how to convert my soon-to-be-deprecated zip files into the new lib strategy required by platformio …

I see:

WARNING: This command is deprecated and will be removed in the next releases. 
Please use `pio pkg install` instead.
pio pkg -h
Usage: pio pkg [OPTIONS] COMMAND [ARGS]...

  -h, --help  Show this message and exit.

  exec       Run command from package tool
  install    Install the project dependencies or custom packages
  list       List installed packages
  outdated   Check for outdated packages
  pack       Create a tarball from a package
  publish    Publish a package to the registry
  search     Search for packages
  show       Show package information
  uninstall  Uninstall the project dependencies or custom packages
  unpublish  Remove a pushed package from the registry
  update     Update the project dependencies or custom packages

This is just pio pkg install -l C:\Users\Max\Downloads\ now to install a library. If you want to install it globally instead of per-project, use pio pkg install -g -l ....