python3.7
安装
cd /usr/local
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
tar zxvf Python-3.7.0.tgz
yum install gcc gcc-c++ libffi-devel -y
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
cd Python-3.7.0/
./configure --prefix=/usr/local/python3
make
make install
设置软连接
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
更新 pip
python3 -V
python3 -m pip install --upgrade pip
scrapy
安装
python3 -V
python3 -m pip install --upgrade pip
python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple scrapy
python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple twisted[tls]
python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple dbutils
python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pymysql
启动
python3 -m scrapy crawl test_spider
nohup python3 main.py > my.log 2>&1 &
ps -ef|grep python