Search code examples
scrapinghub

Dependency error while trying to run project on Scrapy Cloud


I create a project with scrapy and using pymongo save my data to mongodb.

I have checked my pymongo version is 3.5.1

When i deploy my project to scrapinghub and run it.

It shows error on scrapinghub exceptions.ImportError: No module named pymongo

I have created requirements.txt and scrapinghub.yml. enter image description here

enter image description here

Why it shows error exceptions.ImportError: No module named pymongo ? enter image description here Any help would be appreciated. Thanks in advance.

enter image description here


Solution

  • You have the format of requirements.txt which did not work for me too.

    Please try this format instead

    projects:
      default: 111149
    requirements:
      file: requirements.txt
    

    Also generate a temporary requirements file by pip freeze > temp_req.txt and see how your pymongo module is written inside that file, copy exact same line and put that into requirements.txt