pyspider

环境:centos6.4

1.安装Python

wget https://www.python.org/ftp/python/3.5.4/Python-3.5.4.tar.xz
xz -d ***.tar.xz
tar -xvf  ***.tar
cd Python3 
yum install -y gcc 
./configure --prefix=/usr/local/python3 
make && make install 

[pip error while installing Python: “Ignoring ensurepip failure: pip 8.1.1 requires SSL/TLS”](https://stackoverflow.com/questions/37723236/pip-error-while-installing-python-ignoring-ensurepip-failure-pip-8-1-1-requir)
解决:
CentOS
yum install openssl-devel
In addition it is recommended to install the following.
yum install zlib-devel bzip2-devel sqlite sqlite-devel openssl-devel

(Unix设计思想是一个工具只做一件事,tar是文件打包,gzip是压缩。)
(.tgz是.tar.gz格式的简写)

使用--prefix的原因:配置安装的路径
http://www.maybe520.net/blog/1945/

建立软连接,在命令行输入python3,即可调出Python3,即多版本共存

ln -sf /usr/local/python3/bin/python3.5 /usr/local/bin/python3

pip

wget --no-check-certificate https://github.com/pypa/pip/archive/9.0.1.tar.gz
tar -zvxf 9.0.1
cd pip-9.0.1
# 使用 Python 3 安装
python3 setup.py install
创建链接:
sudo ln -s /usr/local/python3/bin/pip /usr/bin/pip3

virtualenv

pip3 install virtualenv
python3 -m virtualenv env
source env/bin/activate

pyspider
pip install pyspider
错误:
_main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory: 'curl-config' ... Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-5pga_8o7/pycurl/
解决:
yum install libcurl-devel

MongoDB

wget [http://downloads.mongodb.org/linux/mongodb-linux-x86_64-amazon-3.2.8.tgz](http://downloads.mongodb.org/linux/mongodb-linux-x86_64-amazon-3.2.8.tgz)

你可能感兴趣的:(pyspider)