标签:doc 依赖 sip server files 服务器 tar 手动 span
安装pip工具(本文只为熟悉所有依赖,为方便能使用yum安装的尽量会选择yum安装,没有网络环境只能自己想办法了~~~)
yum -y install epel-release
yum -y install python-pip
安装git工具
yum install -y git
安装scrapy
pip install scrapy
解决办法:安装gcc,g++
yum -y install gcc gcc-c++
重新安装scrapy
解决办法:安装python-devel(ubuntu里好像叫python-dev)
yum install -y python-devel
解决办法:安装openssl-devel
yum install -y openssl-devel
重新执行pip install scrapy后安装成功。
安装virtualenv
pip install virtualenv
创建一个虚拟环境,随便命名一个,这里我命名为“pot”
virtualenv pot
source pot/bin/activate mkdir pot (第一次安装在发现在虚拟环境里安装numpy会有问题,所以直接在云服务器环境上安装)
cd pot
git clone https://github.com/scrapinghub/portia.git
cd portia/slyd/bin
./slyd
安装splash
pip install splash
安装Qt5
yum install -y qt5-qtquickcontrols qt5-qtdeclarative-devel qt5-qtwebkit qt5-qtwebkit-devel
安装sip
wget https://sourceforge.net/projects/pyqt/files/sip/sip-4.19/sip-4.19.tar.gz tar -zxvf sip-4.19.tar.gz cd sip-4.19 python configure.py make make install make clean
安装pyqt5
wget https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.7.1/PyQt5_gpl-5.7.1.tar.gz tar -zxvf PyQt5_gpl-5.7.1.tar.gz cd PyQt5_gpl-5.7.1 python configure.py --qmake=/usr/bin/qmake-qt5 make all (耗时有点长,给点耐心) make install make clean
pip install -v xvfbwrapper==0.2.7
yum install python-xvfbwrapper
export PYTHONPATH=‘/root/pot/portia/portia_server:/root/pot/portia/slyd:/root/pot/portia/slybot‘
pip install -v django==1.10.1
pip install -v whitenoise==3.2
pip install -v marshmallow==2.8.0
yum install numpy pip install scrapy
pip install dateparser
pip install page_finder
pip install dulwich
pip install toposort
pip install autobahn
pip install loginform
pip install requests
未完待续
标签:doc 依赖 sip server files 服务器 tar 手动 span
原文地址:http://www.cnblogs.com/guapeng/p/6434458.html