问题
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.
Why it shows error exceptions.ImportError: No module named pymongo
?
Any help would be appreciated. Thanks in advance.
回答1:
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
来源:https://stackoverflow.com/questions/47117975/dependency-error-while-trying-to-run-project-on-scrapy-cloud