• 安装scrapy报错


    win10 pycharm virtualenv python3.5

    (env) C:UserslgPycharmProjectsuntitled>pip3 install scrapy
    You are using pip version 7.1.0, however version 18.0 is available.
    You should consider upgrading via the 'python -m pip install --upgrade pip' command.
    Collecting scrapy
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/5d/12/a6197eaf97385e96fd8ec56627749a6229a9b3178ad73866a0b1fb377379/Scrapy-1.5.1-py2.py3-none-any.whl
    Collecting w3lib>=1.17.0 (from scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/37/94/40c93ad0cadac0f8cb729e1668823c71532fd4a7361b141aec535acb68e3/w3lib-1.19.0-py2.py3-none-any.whl
    Collecting parsel>=1.1 (from scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/fd/1a/9642a5ea68763d5e7c419df0873073e54bb23d0a8897d3c78e146dd6f355/parsel-1.5.0-py2.py3-none-any.whl
    Collecting service-identity (from scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/29/fa/995e364220979e577e7ca232440961db0bf996b6edaf586a7d1bd14d81f1/service_identity-17.0.0-py2.py3-none-any.whl
    Collecting lxml (from scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ca/63/139b710671c1655aed3b20c1e6776118c62e9f9311152f4c6031e12a0554/lxml-4.2.4.tar.gz
    Collecting pyOpenSSL (from scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/96/af/9d29e6bd40823061aea2e0574ccb2fcf72bfd6130ce53d32773ec375458c/pyOpenSSL-18.0.0-py2.py3-none-any.whl
    Collecting queuelib (from scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/4c/85/ae64e9145f39dd6d14f8af3fa809a270ef3729f3b90b3c0cf5aa242ab0d4/queuelib-1.5.0-py2.py3-none-any.whl
    Collecting PyDispatcher>=2.0.5 (from scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/cd/37/39aca520918ce1935bea9c356bcbb7ed7e52ad4e31bff9b943dfc8e7115b/PyDispatcher-2.0.5.tar.gz
    Collecting Twisted>=13.1.0 (from scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/90/50/4c315ce5d119f67189d1819629cae7908ca0b0a6c572980df5cc6942bc22/Twisted-18.7.0.tar.bz2
    Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in c:userslgenvlibsite-packages (from scrapy)
    Collecting cssselect>=0.9 (from scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/7b/44/25b7283e50585f0b4156960691d951b05d061abf4a714078393e51929b30/cssselect-1.0.3-py2.py3-none-any.whl
    Requirement already satisfied (use --upgrade to upgrade): attrs in c:userslgenvlibsite-packages (from service-identity->scrapy)
    Collecting pyasn1-modules (from service-identity->scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/19/02/fa63f7ba30a0d7b925ca29d034510fc1ffde53264b71b4155022ddf3ab5d/pyasn1_modules-0.2.2-py2.py3-none-any.whl
    Collecting pyasn1 (from service-identity->scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/d1/a1/7790cc85db38daa874f6a2e6308131b9953feb1367f2ae2d1123bb93a9f5/pyasn1-0.4.4-py2.py3-none-any.whl
    Collecting cryptography>=2.2.1 (from pyOpenSSL->scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/22/21/233e38f74188db94e8451ef6385754a98f3cad9b59bedf3a8e8b14988be4/cryptography-2.3.1.tar.gz
    Requirement already satisfied (use --upgrade to upgrade): zope.interface>=4.4.2 in c:userslgenvlibsite-packages (from Twisted>=13.1.0->scrapy)
    Requirement already satisfied (use --upgrade to upgrade): constantly>=15.1 in c:userslgenvlibsite-packages (from Twisted>=13.1.0->scrapy)
    Requirement already satisfied (use --upgrade to upgrade): incremental>=16.10.1 in c:userslgenvlibsite-packages (from Twisted>=13.1.0->scrapy)
    Requirement already satisfied (use --upgrade to upgrade): Automat>=0.3.0 in c:userslgenvlibsite-packages (from Twisted>=13.1.0->scrapy)
    Requirement already satisfied (use --upgrade to upgrade): hyperlink>=17.1.1 in c:userslgenvlibsite-packages (from Twisted>=13.1.0->scrapy)
    Requirement already satisfied (use --upgrade to upgrade): PyHamcrest>=1.9.0 in c:userslgenvlibsite-packages (from Twisted>=13.1.0->scrapy)
    Requirement already satisfied (use --upgrade to upgrade): idna>=2.1 in c:userslgenvlibsite-packages (from cryptography>=2.2.1->pyOpenSSL->scrapy)
    Collecting asn1crypto>=0.21.0 (from cryptography>=2.2.1->pyOpenSSL->scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl
    Collecting cffi!=1.11.3,>=1.7 (from cryptography>=2.2.1->pyOpenSSL->scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
          File "<string>", line 20, in <module>
          File "C:UserslgAppDataLocalTemppip-build-zrr6q7_ycffisetup.py", line 120, in <module>
            if sys.platform == 'win32' and uses_msvc():
          File "C:UserslgAppDataLocalTemppip-build-zrr6q7_ycffisetup.py", line 98, in uses_msvc
            return config.try_compile('#ifndef _MSC_VER
    #error "not MSVC"
    #endif')
          File "C:Program Filespythonlibdistutilscommandconfig.py", line 227, in try_compile
            self._compile(body, headers, include_dirs, lang)
          File "C:Program Filespythonlibdistutilscommandconfig.py", line 133, in _compile
            self.compiler.compile([src], include_dirs=include_dirs)
          File "C:Program Filespythonlibdistutils\_msvccompiler.py", line 315, in compile
            self.initialize()
          File "C:Program Filespythonlibdistutils\_msvccompiler.py", line 208, in initialize
            vc_env = _get_vc_env(plat_spec)
          File "C:Program Filespythonlibdistutils\_msvccompiler.py", line 81, in _get_vc_env
            vcvarsall, vcruntime = _find_vcvarsall(plat_spec)
          File "C:Program Filespythonlibdistutils\_msvccompiler.py", line 34, in _find_vcvarsall
            access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY
        FileNotFoundError: [WinError 2] 系统找不到指定的文件。
    
        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in C:UserslgAppDataLocalTemppip-build-zrr6q7_ycffi
    
    (env) C:UserslgPycharmProjectsuntitled>pip3 install scrapy
    You are using pip version 7.1.0, however version 18.0 is available.
    You should consider upgrading via the 'python -m pip install --upgrade pip' command.
    Collecting scrapy
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/5d/12/a6197eaf97385e96fd8ec56627749a6229a9b3178ad73866a0b1fb377379/Scrapy-1.5.1-py2.py3-none-any.whl
    Collecting pyOpenSSL (from scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/96/af/9d29e6bd40823061aea2e0574ccb2fcf72bfd6130ce53d32773ec375458c/pyOpenSSL-18.0.0-py2.py3-none-any.whl
    Collecting Twisted>=13.1.0 (from scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/90/50/4c315ce5d119f67189d1819629cae7908ca0b0a6c572980df5cc6942bc22/Twisted-18.7.0.tar.bz2
    Collecting service-identity (from scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/29/fa/995e364220979e577e7ca232440961db0bf996b6edaf586a7d1bd14d81f1/service_identity-17.0.0-py2.py3-none-any.whl
    Collecting w3lib>=1.17.0 (from scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/37/94/40c93ad0cadac0f8cb729e1668823c71532fd4a7361b141aec535acb68e3/w3lib-1.19.0-py2.py3-none-any.whl
    Collecting lxml (from scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ca/63/139b710671c1655aed3b20c1e6776118c62e9f9311152f4c6031e12a0554/lxml-4.2.4.tar.gz
    Collecting queuelib (from scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/4c/85/ae64e9145f39dd6d14f8af3fa809a270ef3729f3b90b3c0cf5aa242ab0d4/queuelib-1.5.0-py2.py3-none-any.whl
    Collecting parsel>=1.1 (from scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/fd/1a/9642a5ea68763d5e7c419df0873073e54bb23d0a8897d3c78e146dd6f355/parsel-1.5.0-py2.py3-none-any.whl
    Collecting PyDispatcher>=2.0.5 (from scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/cd/37/39aca520918ce1935bea9c356bcbb7ed7e52ad4e31bff9b943dfc8e7115b/PyDispatcher-2.0.5.tar.gz
    Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in c:userslgenvlibsite-packages (from scrapy)
    Collecting cssselect>=0.9 (from scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/7b/44/25b7283e50585f0b4156960691d951b05d061abf4a714078393e51929b30/cssselect-1.0.3-py2.py3-none-any.whl
    Collecting cryptography>=2.2.1 (from pyOpenSSL->scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/22/21/233e38f74188db94e8451ef6385754a98f3cad9b59bedf3a8e8b14988be4/cryptography-2.3.1.tar.gz
    Requirement already satisfied (use --upgrade to upgrade): zope.interface>=4.4.2 in c:userslgenvlibsite-packages (from Twisted>=13.1.0->scrapy)
    Requirement already satisfied (use --upgrade to upgrade): constantly>=15.1 in c:userslgenvlibsite-packages (from Twisted>=13.1.0->scrapy)
    Requirement already satisfied (use --upgrade to upgrade): incremental>=16.10.1 in c:userslgenvlibsite-packages (from Twisted>=13.1.0->scrapy)
    Requirement already satisfied (use --upgrade to upgrade): Automat>=0.3.0 in c:userslgenvlibsite-packages (from Twisted>=13.1.0->scrapy)
    Requirement already satisfied (use --upgrade to upgrade): hyperlink>=17.1.1 in c:userslgenvlibsite-packages (from Twisted>=13.1.0->scrapy)
    Requirement already satisfied (use --upgrade to upgrade): PyHamcrest>=1.9.0 in c:userslgenvlibsite-packages (from Twisted>=13.1.0->scrapy)
    Requirement already satisfied (use --upgrade to upgrade): attrs>=17.4.0 in c:userslgenvlibsite-packages (from Twisted>=13.1.0->scrapy)
    Collecting pyasn1-modules (from service-identity->scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/19/02/fa63f7ba30a0d7b925ca29d034510fc1ffde53264b71b4155022ddf3ab5d/pyasn1_modules-0.2.2-py2.py3-none-any.whl
    Collecting pyasn1 (from service-identity->scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/d1/a1/7790cc85db38daa874f6a2e6308131b9953feb1367f2ae2d1123bb93a9f5/pyasn1-0.4.4-py2.py3-none-any.whl
    Requirement already satisfied (use --upgrade to upgrade): idna>=2.1 in c:userslgenvlibsite-packages (from cryptography>=2.2.1->pyOpenSSL->scrapy)
    Collecting asn1crypto>=0.21.0 (from cryptography>=2.2.1->pyOpenSSL->scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl
    Collecting cffi!=1.11.3,>=1.7 (from cryptography>=2.2.1->pyOpenSSL->scrapy)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
          File "<string>", line 20, in <module>
          File "C:UserslgAppDataLocalTemppip-build-w927ga0ycffisetup.py", line 120, in <module>
            if sys.platform == 'win32' and uses_msvc():
          File "C:UserslgAppDataLocalTemppip-build-w927ga0ycffisetup.py", line 98, in uses_msvc
            return config.try_compile('#ifndef _MSC_VER
    #error "not MSVC"
    #endif')
          File "C:Program Filespythonlibdistutilscommandconfig.py", line 227, in try_compile
            self._compile(body, headers, include_dirs, lang)
          File "C:Program Filespythonlibdistutilscommandconfig.py", line 133, in _compile
            self.compiler.compile([src], include_dirs=include_dirs)
          File "C:Program Filespythonlibdistutils\_msvccompiler.py", line 315, in compile
            self.initialize()
          File "C:Program Filespythonlibdistutils\_msvccompiler.py", line 208, in initialize
            vc_env = _get_vc_env(plat_spec)
          File "C:Program Filespythonlibdistutils\_msvccompiler.py", line 81, in _get_vc_env
            vcvarsall, vcruntime = _find_vcvarsall(plat_spec)
          File "C:Program Filespythonlibdistutils\_msvccompiler.py", line 34, in _find_vcvarsall
            access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY
        FileNotFoundError: [WinError 2] 系统找不到指定的文件。
    
        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in C:UserslgAppDataLocalTemppip-build-w927ga0ycffi 
    

      google 能查到的方法基本都试了,but no use.

    最后安装的twisted 17.9.0

    如果要下载独立的twisted 17.9.0 whl 包,可以云这里: https://github.com/zerodhatech/python-wheels/blob/master/Twisted-17.9.0-cp35-cp35m-win_amd64.whl

    或者直接: pip install twisted== 17.9.0

    两次重新安装 scrapy, successful!

  • 相关阅读:
    模拟退火求最小覆盖圆和最小覆盖球
    牛客SQL题解-请你对于表actor批量插入如下数据(不能有2条insert语句哦!)
    牛客SQL题解-创建一个actor表,包含如下列信息
    牛客SQL题解-将employees表的所有员工的last_name和first_name拼接起来作为Name,中间以一个空格区分
    牛客SQL题解-查找描述信息中包括robot的电影对应的分类名称以及电影数目
    牛客SQL题解-汇总各个部门当前员工的title类型的分配数目
    JavaScript
    JavaScript-给代码添加注释
    牛客SQL题解-获取员工其当前的薪水比其manager当前薪水还高的相关信息
    牛客SQL题解-获取所有非manager员工当前的薪水情况
  • 原文地址:https://www.cnblogs.com/Andy963/p/9515574.html
Copyright © 2020-2023  润新知