安装完对Scrapy进行测试的时候发现了问题
scrapy -hFatal error in launcher: Unable to create process ...
第一次运行scrapy出现了上面的报错,原因是电脑中安装了多个python版本,所以导致报错。
解决方法就是指明使用的Python版本就好。我的Win10默认使用anaconda中的Python3,所以直接使用 python -m scrapy -h 命令就可以。不同的版本可以将 python 替换为 python2 或者 python3 进行调用即可
python -m scrapy -hScrapy 2.1.0 - no active projectUsage:scrapy <command> [options] [args]Available commands:bench Run quick benchmark testfetch Fetch a URL using the Scrapy downloadergenspider Generate new spider using pre-defined templatesrunspider Run a self-contained spider (without creating a project)settings Get settings valuesshell Interactive scraping consolestartproject Create new projectversion Print Scrapy versionview Open URL in browser, as seen by Scrapy[ more ] More commands available when run from project directoryUse "scrapy <command> -h" to see more info about a command
