【问题标题】:Scrapyd-deploy command not found after scrapyd installationscrapyd安装后找不到scrapyd-deploy命令
【发布时间】:2015-07-14 05:31:36
【问题描述】:

我创建了几个网络蜘蛛,打算与 scrapyd 同时运行。我首先使用以下命令在 Ubuntu 14.04 中成功安装了 scrapyd: pip install scrapyd,当我运行命令:scrapyd,我在终端得到以下输出:

2015-07-14 01:22:02-0400 [-] Log opened.
2015-07-14 01:22:02-0400 [-] twistd 13.2.0 (/usr/bin/python 2.7.6) starting up.
2015-07-14 01:22:02-0400 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
2015-07-14 01:22:02-0400 [-] Site starting on 6800
2015-07-14 01:22:02-0400 [-] Starting factory <twisted.web.server.Site instance at 0x7f762f4391b8>
2015-07-14 01:22:02-0400 [Launcher] Scrapyd 1.1.0 started: max_proc=8, runner='scrapyd.runner'

我相信我得到这个输出的事实表明scrapy正在工作;但是,当我像docs 一样运行命令:scrapyd-deploy 时,我收到错误:scrapyd-deploy: command not found。如果安装成功,这怎么可能?我在配置文件中包含了以下目标:

[deploy:scrapyd2]
url = http://scrapyd.mydomain.com/api/scrapyd/
username = name
password = secret

我不确定目标是如何工作的,但我基本上是从文档中复制的,所以我认为它会起作用。有什么我应该导入或配置但我没有的东西吗?谢谢。

【问题讨论】:

    标签: python web-scraping scrapy twisted scrapyd


    【解决方案1】:

    scrapyd-deploy 是scrapyd-client 的一部分。您可以从PyPi 安装它。试试:

    $ sudo pip install scrapyd-client
    

    【讨论】:

    • 不知道为什么scrapyd-client的github页面没有提到如何安装。
    • 我用 pip install scrapyd-client 安装了scrapy,但仍然找不到scrapyd-client
    【解决方案2】:

    可以直接从git安装:

    pip install git+https://github.com/scrapy/scrapyd-client
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-09
      • 1970-01-01
      • 1970-01-01
      • 2014-05-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多