zoukankan      html  css  js  c++  java
  • 64位Ubuntu 安装scrapy遇到的问题

    这两天准备开始学习Python爬虫,安装scrapy框架后出现
    Traceback (most recent call last):
    File "/usr/local/bin/scrapy", line 7, in
    from scrapy.cmdline import execute
    File "/usr/local/lib/python2.7/dist-packages/scrapy/init.py", line 56, in
    from scrapy.spider import Spider
    File "/usr/local/lib/python2.7/dist-packages/scrapy/spider.py", line 7, in
    from scrapy.http import Request
    File "/usr/local/lib/python2.7/dist-packages/scrapy/http/init.py", line 11, in
    from scrapy.http.request.form import FormRequest
    File "/usr/local/lib/python2.7/dist-packages/scrapy/http/request/form.py", line 9, in
    import lxml.html
    File "/usr/local/lib/python2.7/dist-packages/lxml-3.3.3-py2.7-linux-i686.egg/lxml/html/init.py", line 42, in
    from lxml import etree
    ImportError: /usr/local/lib/python2.7/dist-packages/lxml-3.3.3-py2.7-linux-i686.egg/lxml/etree.so: wrong ELF class: ELFCLASS32

    发现lxml模块在64位下没有安装好,折腾了一下午,最后看到http://www.cnblogs.com/ifantastic/p/3830707.html这篇文章才给安装好。

    先更新安装依赖包:
    $sudo apt-get build-dep python-lxml

    再重新用pip安装就可以了
    $ sudo pip install lxml --upgrade

  • 相关阅读:
    mycat实例(1)
    Java连接Oracle数据库的示例代码
    文本处理grep命令
    回调函数
    算法基础--快排序,堆排序,归并排序
    c++ 中double与string之间的转换,char *
    c++ 类型转换
    allocator class
    csapp读书笔记-并发编程
    树的遍历-递归方法,非递归方法
  • 原文地址:https://www.cnblogs.com/nan86150/p/3997074.html
Copyright © 2011-2022 走看看