zoukankan      html  css  js  c++  java
  • python3 安装scrapy Exception: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 1006, in check_if_exists解决方法

    错误代码:

    Exception:
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 1006, in check_if_exists
        self.satisfied_by = pkg_resources.get_distribution(str(no_marker))
      File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 535, in get_distribution
        dist = get_provider(dist)
      File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 415, in get_provider
        return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
      File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 695, in find
        raise VersionConflict(dist, req)
    pkg_resources.VersionConflict: (cryptography 1.2.3 (/usr/lib/python3/dist-packages), Requirement.parse('cryptography>=1.3'))
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 209, in main
        status = self.run(options, args)
      File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 317, in run
        requirement_set.prepare_files(finder)
      File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 360, in prepare_files
        ignore_dependencies=self.ignore_dependencies))
      File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 448, in _prepare_file
        req_to_install, finder)
      File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 387, in _check_skip_installed
        req_to_install.check_if_exists()
      File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 1011, in check_if_exists
        self.req.project_name
    AttributeError: 'Requirement' object has no attribute 'project_name'

    解决方法:安装全所需库文件即可:

    sudo apt-get install build-essential
    sudo apt-get install python3-dev
    sudo apt-get install libxml2-de;
    sudo apt-get install libxslt1-dev
    sudo apt-get install libssl-dev
    apt-get install -y libffi-dev
    pip3 install Twisted
    pip3 install w3lib
    pip3 install lxm
  • 相关阅读:
    [LeetCode] 687. Longest Univalue Path
    [Daily Coding Problem] 1 (LeetCode 1). Find if two numbers in an array add up to k
    [Daily Coding Problem] 18 (LeetCode 239). Sliding Window Maximum
    [Daily Coding Problem 24] Implement locking in a binary tree.
    [LeetCode] 208(LintCode). Implement Trie(Prefix Tree)
    [Daily Coding Problem] 16. Last N order ids implementation
    队伍总结 2017年5月14日
    ECNU 3260 袋鼠妈妈找孩子(dfs)
    ECNU 3263 丽娃河的狼人传说 (贪心)
    UVA 213 信息解码(二进制&位运算)
  • 原文地址:https://www.cnblogs.com/INnoVationv2/p/5693702.html
Copyright © 2011-2022 走看看