Skip to content

Can't import pdf2image library (but Requirement already satisfied: pdf2image when pip install) #17

Open
@omkom

Description

@omkom

Hello all, first of all : a big THANK YOU for your work.

I write today to exit from three days stunned posture trying to use Python pdf2image import and code in a code block.

Here is my config :

  • docker-compose.yml with requirements.txt mounted
  • sudo docker compose up -> the whoami function in the container show that I'm root inside it
  • my "N8N - Trigger install Python" workflow with "instance started" and a "Execute comand : pip install -r requirements.txt" stdout respond
    Defaulting to user installation because normal site-packages is not writeable\n [...] Requirement already satisfied: pdf2image in /home/node/.local/lib/python3.10/site-packages (from -r requirements.txt (line 7)) (1.17.0)
  • the "Execute command" block with "pip install pdf2image" stdout respond
    Defaulting to user installation because normal site-packages is not writeable\nRequirement already satisfied: pdf2image in /home/node/.local/lib/python3.10/site-packages (1.17.0)\nRequirement already satisfied: pillow in /home/node/.local/lib/python3.10/site-packages (from pdf2image) (10.4.0)

The error is :
in my transform pdf into image part of my workflows, the "code block" (python setup) return
Problem in node ‘Code2‘ ModuleNotFoundError: No module named 'pdf2image' and I cannot pass this damned error.

Capture d’écran 2024-08-16 à 11 30 30

Hope you can help me to understand if the problem comes from my docker compose setup or command, my privileges on my mount container or something that I don't expect.

Bests Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions