The Library Manager is the simplest and safest way to install libraries.  If possible, that is the method you should use. 

If the library you want to use is not available via the library manager, you can get the source code and place it into your machine's local library folder. The location of the folder is rather specific.

See the file hierarchy below:

It is important to install your libraries in the correct location. Otherwise the compiler will not be able to locate them when you try to compile and upload your sketches.

Incorrectly installed libraries can cause many problems with the IDE.

Locate your Sketchbook Folder and the Libraries Folder Inside

Your sketchbook folder is the folder where the Arduino IDE stores your sketches. This folder is automatically created by the IDE when you install it.

On Linux machines, the folder is named "Sketchbook" and it is typically located in /home/

On Windows and Macintosh machines, the default name of the folder is "Arduino" and is located in your Documents folder.

This is a common source of confusion on Windows and Mac machines, your sketchbook folder is not named "sketchbook" it is named "Arduino"!

User installed libraries should go in a folder named Libraries, located inside your sketchbook folder. This is where the IDE will look for user installed libraries.

On version 1.0.2 and later of the Arduino IDE, the "Libraries" folder is created automatically. On earlier versions of the IDE, you may need to create it when you install your first library.

Open the Preferences Dialog

 

Click File -> Preferences in the IDE.

Find the Sketchbook Location

 

Usually a folder named Arduino in your Documents folder.

Once you know the location, navigate to this folder in Windows Explorer or mac Finder

Create a Libraries Folder

 

If there is no Libraries folder there, create one.

Right click in Windows Explorer and select New -> Folder.

Rename to Libraries

 

Right click on the New Folder and select Rename. Then type in Libraries.

This guide was first published on Feb 16, 2013. It was last updated on Mar 08, 2024.

This page (Installing Libraries Manually) was last updated on Mar 08, 2024.

Text editor powered by tinymce.