我有一个使用Scrapy编写的项目。这个爬虫在setup.py中有很多要求。以下是一个简单的示例。我运行
scrapyd-deploy
并且会产生以下输出。
Packing version 1506254163
Deploying to project "quotesbot" in http://localhost:6800/addversion.json
Server response (200):
......................... [CUTTED TRACEBACK] ...........
\"/private/var/folders/xp/c949vlsd14q8xm__dv0dx8jh0000gn/T/quotesbot-1506254163-e50lmcfx.egg/quotesbot/spiders/toscrape-css.py\",
line 4, in <module>\n
ModuleNotFoundError: No module named 'sqlalchemy'\n"}
但是
setup.py in the same directory:
# Automatically created by: scrapyd-deploy
from setuptools import setup, find_packages
setup(
name = 'quotesbot',
version = '1.0',
packages = find_packages(),
entry_points = {'scrapy': ['settings = quotesbot.settings']},
install_requires=[
'scrapy-splash',
[ SOME REQUIREMENTS]
'sqlalchemy'
],
)