Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
omkom opened this issue Aug 16, 2024 · 1 comment

Comments

@omkom
Copy link

omkom commented Aug 16, 2024

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

@traderpedroso
Copy link

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.

Captura de Tela 2024-08-23 às 22 47 07

Bests Regards

You can't import using code block! this node are not the code block search for python Function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants