问答详情
源自:2-7 spider文件的编写(2)

运行from scrapy import cmdline cmdline.execute('scrapy crawl douban_spider'.split(),单独在cmd里面运行可以,在pycharm运行报错

Traceback (most recent call last):

  File "F:/pythonspace/scrapy/douban/douban/main.py", line 1, in <module>

    from scrapy import cmdline

ImportError: cannot import name 'cmdline'


提问者:少小佐 2018-10-02 23:16

个回答

  • 微企陈琛
    2018-10-06 22:44:45

    https://stackoverflow.com/questions/49356711/scrapy-error-importerror-no-module-named-scrapy-cmdline