zoukankan      html  css  js  c++  java
  • 安装scrapy报错 Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools":

    错误信息:

    building 'twisted.test.raiser' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

    错误原因:

    Twisted编译,要调用VC++ 14.0

    解决方法

    下载Twisted whl 文件,直接安装

    下载地址:

    下载版本:

    在命令行运行 python, 根据安装的Phyton版本下载。如下,python版本是3.8,32bit , 就下载Twisted 20.3.0-cp38-cp38-win32.whl

    C:UsersAdministratorPycharmProjectsJquery_TestvenvScripts>python
    Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (In
    tel)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>>

    安装Twisted

    1. Ctrl + Z 退出Python命令行

    2. 安装Twister

    C:XXXPycharmProjectsYYYScripts>pip install Twisted 20.3.0-cp38-cp38-win32.whl   

    3.安装Scrapy

    C:XXXPycharmProjectsYYYvenvScripts>pip install scrapy

    4.查看安装

    C:XXXPycharmProjectsYYYvenvScripts>pip list

    5. 运行Scrapy

    C:XXXPycharmProjectsYYYvenvScripts>scrapy shell

    注意事项:

    1、如果wheel未安装,可能出现安装Twisted 20.3.0-cp38-cp38-win32.whl  失败,请先安装Wheel

    C:XXXPycharmProjectsYYYvenvScripts>pip install wheel

    2、注意python是32位的还是64位的

    尽管操作系统是64位的,但是你安装的python很可能是32位的,否则可能报错is not a supported wheel on this platform

    3、Twisted 版本选择,要根据Python来选择

    否则可能报错:is not a supported wheel on this platform

    4. module 'pip' has no attribute 'pep425tags' 错误,

    AMD64
    import pip._internal
    print(pip._internal.pep425tags.get_supported())
    WIN32
    import pip
    print(pip.pep425tags.get_supported())

    上面的两个方式,我都试过了,都会报错。不要去管这个,按照“下载版本"中的方法来下载。

  • 相关阅读:
    万恶的 one or more listeners failed to start 和 Servlet.init() for servlet [dispatcherServlet] threw exception
    实验四 主存空间的分配和回收
    实验二 作业调度模拟程序
    实验一
    实验三
    【安卓】实验7 BindService模拟通信
    计时器页面设计
    实验五 存储管理实验
    实验6 在应用程序中播放音频和视频
    实验5数独游戏界面设计
  • 原文地址:https://www.cnblogs.com/montai/p/13197187.html
Copyright © 2011-2022 走看看