zoukankan      html  css  js  c++  java
  • 使用pip安装Scrapy出错

    安装Scrapy出错

    安装

    使用pip安装(Ubuntu)

    # 安装pip
    sudo apt install python-pip	# python2
    sudo apt install python3-pip # python3
    # python3
    sudo pip3 install Scrapy
    # python2
    sudo pip install Scrapy
    

    错误

    cryptography安装出错

    使用pip安装Scrapy时:

    ...
    ...
    Requirement already satisfied: pycparser in /usr/local/lib/python3.5/dist-packages (from cffi>=1.4.1->cryptography>=1.3.4->pyOpenSSL->Scrapy)
    Installing collected packages: cryptography, pyOpenSSL, service-identity, Scrapy
      Found existing installation: cryptography 1.2.3
        Uninstalling cryptography-1.2.3:
          Successfully uninstalled cryptography-1.2.3
      Running setup.py install for cryptography ... error
        Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-cye1ome_/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('
    ', '
    ');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-q_y00_ho-record/install-record.txt --single-version-externally-managed --compile:
        running install
        running build
        running build_py
        creating build
        creating build/lib.linux-x86_64-3.5
        creating build/lib.linux-x86_64-3.5/cryptography
        copying src/cryptography/exceptions.py -> build/lib.linux-x86_64-3.5/cryptography
        copying src/cryptography/__init__.py -> build/lib.linux-x86_64-3.5/cryptography
        copying src/cryptography/fernet.py -> build/lib.linux-x86_64-3.5/cryptography
    ...
    ...
    

    解决方法

    点击查看原文

    可能的原因: 缺少依赖库.

    for Ubuntu

    python2

    sudo apt-get install build-essential libssl-dev libffi-dev python-dev

    python3

    sudo apt-get install build-essential libssl-dev libffi-dev python3-dev

  • 相关阅读:
    构建布局良好的Windows程序
    新认知之WinForm窗体程序
    分组查询之牛刀小试!
    Azure虚拟机时间同步问题
    关闭同一网络内的windows主机
    关于jdbc和数据库连接池的关系(不是封装的关系)
    spring,springMVC的优点和区别
    从新向你学习javase(第一天)
    spring包
    事物
  • 原文地址:https://www.cnblogs.com/bovenson/p/6595644.html
Copyright © 2011-2022 走看看