centos7下scrapy运行环境配置

最近根据须要,使用scrapy开发了一个爬虫应用,直接使用的python2,记录一下部署环境。python

1.安装epel扩展源 scrapy

yum -y install epel-release阿里云


2.安装pipcrontab

yum -y install python-pipip

 

3.安装scrapy ssl

pip install scrapy开发

阿里云镜像:pip install scrapy -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com部署


4.若出现 command 'gcc' failed with exit status 1,gcc编译缺乏模块
openssl

yum install gcc libffi-devel python-devel openssl-develit


5.未安装MySQLdb

yum install MySQL-python


6.若需定时脚本

crontab -e

案例:0 * * * * cd /wnet/pig && scrapy crawl price

相关文章
相关标签/搜索