Windows下安装Scrapy
程序员文章站
2022-05-09 22:48:56
...
使用版本:Python 3.7.6
所需文件:
lxml-4.5.0-cp37-cp37m-win_amd64.whl
pywin32-227-cp37-cp37m-win_amd64.whl
Twisted-19.10.0-cp37-cp37m-win_amd64.whl
这三个文件都可以直接百度搜索下载,cp37表示python版本是3.7,
1、使用Win+r,然后输入CMD,进入DOS窗口,
2、更新pip,命令:python -m pip --default-timeout=100 install --upgrade pip
3、安装wheel:pip install wheel
3、然后切换到已经下载了所需文件的目录,使用pip install xxxxxx 安装lxml、pywin32、Twisted
4、安装Scrapy:pip install scrapy,
安装期间遇到问题
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files .pythonhosted.org', port=443): Read timed out.
查询后发现是pip下载超时问题,修改为:pip install --default-timeout=1000 scrapy
5、检测是否安装成功:dos窗口输入scrapy
C:\Users\Administrator>scrapy
Scrapy 1.8.0 - no active project
Usage:
scrapy <command> [options] [args]
Available commands:
bench Run quick benchmark test
fetch Fetch a URL using the Scrapy downloader
genspider Generate new spider using pre-defined templates
runspider Run a self-contained spider (without creating a project)
settings Get settings values
shell Interactive scraping console
startproject Create new project
version Print Scrapy version
view Open URL in browser, as seen by Scrapy
[ more ] More commands available when run from project directory
Use "scrapy <command> -h" to see more info about a command
推荐阅读
-
详解Linux(centos7)下安装OpenSSL安装图文方法
-
Ubuntu下安装并配置VS Code编译C++的方法
-
Windows下通过MySQL Installer安装MySQL服务的教程图解
-
Linux下Docker CE使用从包中安装的方式详解
-
Windows10下安装Docker的步骤图文教程
-
Windows下Eclipse+PyDev配置Python+PyQt4开发环境
-
图文详解WinPE下安装Python
-
Windows下搭建python开发环境详细步骤
-
Win7下搭建python开发环境图文教程(安装Python、pip、解释器)
-
Windows系统下使用flup搭建Nginx和Python环境的方法