0

我在 Wndows 7 上安装 scrapyd 时遇到问题我已经使用 easy_install 安装了该软件包,但该命令仍然scrapyd没有任何结果。这是我安装的输出:

C:\Python27\Lib\site-packages\scrapy>easy_install scrapyd
Searching for scrapyd
Reading https://pypi.python.org/simple/scrapyd/
Best match: scrapyd 1.0.1
Downloading https://pypi.python.org/packages/source/s/scrapyd/scrapyd-1.0.1.tar.gz#md5=bc002742a938c40fa7e80f6743320c95
Processing scrapyd-1.0.1.tar.gz
Writing c:\users\uname\appdata\local\temp\easy_install-q7nfgz\scrapyd-1.0.1\setup.cfg
Running scrapyd-1.0.1\setup.py -q bdist_egg --dist-dir c:\users\uname\appdata\local\temp\easy_install-q7nfgz\scrapyd-1.0.1\egg-dist-tmp-ss3ual
no previously-included directories found matching 'docs\_build'
zip_safe flag not set; analyzing archive contents...
Adding scrapyd 1.0.1 to easy-install.pth file
Installing scrapyd script to C:\Python27\Scripts
Installing scrapyd-deploy script to C:\Python27\Scripts

Installed c:\python27\lib\site-packages\scrapyd-1.0.1-py2.7.egg
Processing dependencies for scrapyd
Finished processing dependencies for scrapyd

C:\Python27\Lib\site-packages\scrapy>scrapyd
'scrapyd' is not recognized as an internal or external command,
operable program or batch file.

任何想法,问题是什么?

4

2 回答 2

0

解决方案: 在 Windows 7 [安装后] 从控制台启动 scrapyd:

cd 到 Python_install_dir/Scripts 并从 python 运行 scrapyd。

就我而言:

1.)cd C:\Python27\Scripts

2.)C:\Python27\Scripts> python scrapyd

现在你可以连接到scrapyd:http: //127.0.0.1 :6800/ & 通过控制台

如果您想在后台运行服务器,只需将此命令作为 Windows 后台进程运行。

于 2015-03-14T02:46:02.487 回答
0

我是新来的,我无法发表评论。因此,也许这不是答案,而是解决方法。

首先,我不确定 scrapyd 是否可以在 Windows 上运行。请参阅 Scrapy 文档的这一部分

就个人而言,我在 Windows 上开发,但在 Debian 上部署(在我工作的时候根本找不到 scrapyd 包),并注意到 scrapy 的性能比在 linux 机器上差得多,所以你可能会重新考虑你的目标。但我离题了。

但是,您根本不需要scrapyd。Scrapyd 只是一个在后台继续运行 scrapy 服务器的包装器。要获得相同的功能,您可以从命令行运行(从 scrapy 项目文件夹):

scrapy server

只要命令行正在运行,scrapy 服务器就会运行,但您可以使用 bat 文件和一些软件在后台运行任务来解决此问题。希望能帮助到你。

于 2014-03-16T14:21:37.923 回答