Python command-line breakdown (for “scrapy”)

前端 未结 3 1490
天命终不由人
天命终不由人 2021-01-14 08:59

I was trying to install SCRAPY and play with it.

The tutorial says to run this:

   scrapy startproject tutorial

Can you please br

相关标签:
3条回答
  • 2021-01-14 09:08

    Try

    C:\Python26_32bit\Scripts\Scrapy startproject tutorial 
    

    or add C:\Python26_32bit\Scripts to your path

    0 讨论(0)
  • 2021-01-14 09:19

    scrapy is a batch file which execute a python file called "scrapy", so you need to add the file "scrapy"'s path to your PATH environment.

    if that is still not work, make "scrapy.py" file with content

    from scrapy.cmdline import execute
    execute()
    

    and run \python26_32bit\python.exe scrapy.py startproject tutorial

    0 讨论(0)
  • 2021-01-14 09:21

    I ran accross this error with the following setup: Python installed on Windows. Cygwin (babun) installed. Used pip install Scrapy from the Windows installation (Scrapy now in C:\Python27\Lib\site-packages\scrapy). Wanted to use Scrapy from within babun. Got the same error as you. What you can do:

    In your .bashrc/.zshrc/etc, add the following:

    alias scrapy='python.exe -mscrapy.cmdline'

    I can now run scrapy inside babun without any problems.

    Note: I also had to run pip install service_identity manually.

    0 讨论(0)
提交回复
热议问题