Skip to content

No module name 'PIL' #17

@aravindkarnam

Description

@aravindkarnam

@unclecode You've taken a great initiative with this project!

I've tried setting up crawl4ai in one of my projects built with nodejs and express(I'm running the python script from node upon a post request). I'm running a python script in a virtual environment where I have installed crawl4ai with following command.
pip install "crawl4ai[all] @ git+https://github.com/unclecode/crawl4ai.git"

I ran into this error on first try

Traceback (most recent call last):
File "/Users/aravindkarnam/backend/src/scripts/crawl.py", line 2, in
from crawl4ai.web_crawler import WebCrawler
File "/Users/aravindkarnam/backend/venv/lib/python3.9/site-packages/crawl4ai/init.py", line 1, in
from .web_crawler import WebCrawler
File "/Users/aravindkarnam/backend/venv/lib/python3.9/site-packages/crawl4ai/web_crawler.py", line 10, in
from .crawler_strategy import *
File "/Users/aravindkarnam/backend/venv/lib/python3.9/site-packages/crawl4ai/crawler_strategy.py", line 11, in
from PIL import Image, ImageDraw, ImageFont
ModuleNotFoundError: No module named 'PIL'

Looks like you missed declaring the package "pillow" as dependancy for the project. After I ran pip install pillow the issue got fixed.

Once again thanks for creating this awesome project. Looking forward to contributing to this.

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