Cannot install external library with Processing 4

I have been trying to install an external library (PEmbroider) to use with Processing 4, but with zero success. The documentation states that you should be able to install an external library by dropping the new library folder into the libraries folder which is contained within the sketch folder. In other words, this should work:

Processing > libraries > PEmbroider

But it doesn’t … neither can you install via import Library … as that does not contain any options to choose an external library. What is going wrong here? I have followed different solutions from many sources, but none work. The installation itself is fine, and Processing will run the example programs.

Hi @Kingarthursdog, welcome to the community!

Here’s a step-by-step guide to manually installing the PEmbroider library:

  1. Download the Library
    Download the PEmbroider library .ZIP file for processing 4 and extract the folder from it.

  2. Open the Sketchbook Folder from Processing
    Open Processing, go to File > Sketchbook…, then click the Show Folder button, which will take you directly to your sketchbook folder.

  3. Move the Library to the Libraries Folder
    In your sketchbook folder, find (or create) a folder named libraries. Drag the entire extracted PEmbroider library folder into this libraries folder.

  4. Restart Processing
    Close and reopen Processing to ensure it detects the new library.

After restarting, you should be able to use the PEmbroider library in your sketches. Let me know if this helps!

1 Like

Thank you for your help. Unfortunately this also does not work. I placed the PEmbroider library into the libraries folder (which was generated by Processing) but the new library does not show. I have tried installing a library using:

Sketch > Import Library … > Manage Libraries

and the new library appears to function correctly and the newly installed library does show under contributed libraries. Manually dropping a new library into the libraries folder (and restarting) does not seem to work though. The library that I want to install (PEmbroider) is not available to install through ‘Manage Libraries’, which is frustrating.

Hi @Kingarthursdog!
@sableRaph’s directions work for me on both macOS and Windows. Perhaps you’re on a different operating system or older hardware? Double check that the folder is not inside another folder with the same name. Sometimes when a folder unzips it can put itself inside another folder depending on the software.
The file structure for a library has to look like this:

PEmbroider/
    /examples
         *.pde
    /lib
         core.jar   
   library.properties
   /reference
   /src
         *.java

Hmm … I have tried this on my Macbook and it still does not recognise external libraries. This is a screenshot of the directory structure:

I dropped the PEmbroider library into the libraries folder, restarted Processing, but when I opened the example program, it did not recognise the class. Very frustrating …

Hi @Kingarthursdog ,

Would you please go one step further and show the content of the PEmbroider folder from your screenshot on the right side.

Thanks and Cheers
— mnse

1 Like

Sure, here it is:

Hi @Kingarthursdog,

That’s the problem. This looks like you have downloaded the GitHub repo not the processing library…
Move the whole folder aside.
Look into the folder distribution/download
Inside you should find some zip files named ie. PEmbroider_for_Processing_4.zip.
This is the library you want to install to the libraries folder, so extract that to the library folder, restart processing and it should be there.

Cheers
— mnse

This is how it should look like in the end:

3 Likes

You’re absolutely right, it was the github repo, not the processing library … thanks mnse.