Scrapy startproject不适用于git-bash
问题描述:
我正在使用git-bash的系统上使用win7.我已经安装了Miniconda并使用以下命令加载了scrapy:
I'm working on win7 on a system with git-bash. I've installed Miniconda and loaded scrapy using:
conda install -c scrapinghub scrapy
我将环境变量设置为包含以下内容:
I've set the environmental variables to contain:
C:\Miniconda2;C:\Miniconda2\Scripts
现在,当我这样做时,现在就在蓬乱的vitualenv中:
Now within the scrapy vitualenv, when I do :
(scrapy)
$ scrapy startproject scrapytest
sh: scrapy: command not found
如何在此处使用scrapy命令行工具?
How do I use the scrapy command line tool here?
答
我不知道git-bash对此有何影响,但安装了scrapy 此页面.
I don't know how git-bash has effect on this, but installing scrapy registers one entry point, a console script, calling scrapy.cmdline:execute
. See this page for more info on entry points.
您可以使用带有-m
的python解释器调用相同的代码:
You can invoke the same using the python interpreter with -m
like this:
python -m scrapy.cmdline startproject scrapytest