纯备忘

好久没从头到尾在centos里配环境,记下以备忘。

1、升级python后,easy_install的目录发生改变,要修改路径:


    $ mv /usr/bin/easy_install /usr/bin/easy_install.old
    $ cp /usr/local/bin/easy_install /usr/bin/

2、安装MySQL-python之前,先要安装mysql-devel


   $ yum install mysql-devel
   $ easy_install MySQL-python

3、关于scrapy那点事,先要装lxml这一堆:


   $yum install libxml2
   $yum install libxml2-devel
   $yum install libxslt-devel

然后如果ssl问题,请参考:这里

最后,是该死的“error: Not a recognized archive type: /tmp/easy_install-Qjn3HW/Twisted-12.2.0.tar.bz2”,好吧,自己动手下载Twisted手动安装吧,下载地址在这里


   $ tar -vxjf Twisted-12.2.0.tar.bz2 
   $ cd Twisted-12.2.0
   $ python setup.py install

CentOS easy_install MySQLdb scrapy
Views (4831) Comment (0) 2012-11-22
For example, "name@something.com". If someone replies to you it will be via email.
For example, "http://someaddress.com"