zoukankan      html  css  js  c++  java
  • Python安装Python_snappy安装失败

    系统是win10、python3.8.2

    安装Python_snappy时报错 Microsoft Visual C++ 14.0 is require

    安装Microsoft Visual C++ Build Tools之后又出现报错:

    C:Userssesa542092>python -m pip install pymongo[snappy]
    Requirement already satisfied: pymongo[snappy] in c:userssesa542092appdatalocalprogramspythonpython38-32libsite-packages (3.11.0)
    Collecting python-snappy; extra == "snappy"
      Using cached python-snappy-0.5.4.tar.gz (21 kB)
    Using legacy setup.py install for python-snappy, since package 'wheel' is not installed.
    Installing collected packages: python-snappy
        Running setup.py install for python-snappy ... error
        ERROR: Command errored out with exit status 1:
         command: 'C:Userssesa542092AppDataLocalProgramsPythonPython38-32python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\sesa542092\AppData\Local\Temp\pip-install-94jbnbnl\python-snappy\setup.py'"'"'; __file__='"'"'C:\Users\sesa542092\AppData\Local\Temp\pip-install-94jbnbnl\python-snappy\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
    '"'"', '"'"'
    '"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:Userssesa542092AppDataLocalTemppip-record-8m6z8doginstall-record.txt' --single-version-externally-managed --compile --install-headers 'C:Userssesa542092AppDataLocalProgramsPythonPython38-32Includepython-snappy'
             cwd: C:Userssesa542092AppDataLocalTemppip-install-94jbnbnlpython-snappy
        Complete output (22 lines):
        running install
        running build
        running build_py
        creating build
        creating buildlib.win32-3.8
        creating buildlib.win32-3.8snappy
        copying snappyhadoop_snappy.py -> buildlib.win32-3.8snappy
        copying snappysnappy.py -> buildlib.win32-3.8snappy
        copying snappysnappy_cffi.py -> buildlib.win32-3.8snappy
        copying snappysnappy_cffi_builder.py -> buildlib.win32-3.8snappy
        copying snappysnappy_formats.py -> buildlib.win32-3.8snappy
        copying snappy\__init__.py -> buildlib.win32-3.8snappy
        copying snappy\__main__.py -> buildlib.win32-3.8snappy
        running build_ext
        building 'snappy._snappy' extension
        creating build	emp.win32-3.8
        creating build	emp.win32-3.8Release
        creating build	emp.win32-3.8Releasesnappy
        C:Program Files (x86)Microsoft Visual Studio 14.0VCBINcl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:Userssesa542092AppDataLocalProgramsPythonPython38-32include -IC:Userssesa542092AppDataLocalProgramsPythonPython38-32include "-IC:Program Files (x86)Microsoft Visual Studio 14.0VCINCLUDE" "-IC:Program Files (x86)Windows Kits10include10.0.10240.0ucrt" "-IC:Program Files (x86)Windows Kits8.1includeshared" "-IC:Program Files (x86)Windows Kits8.1includeum" "-IC:Program Files (x86)Windows Kits8.1includewinrt" /EHsc /Tpsnappy/snappymodule.cc /Fobuild	emp.win32-3.8Releasesnappy/snappymodule.obj
        snappymodule.cc
        snappy/snappymodule.cc(31): fatal error C1083: Cannot open include file: 'snappy-c.h': No such file or directory
        error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe' failed with exit status 2
        ----------------------------------------
    ERROR: Command errored out with exit status 1: 'C:Userssesa542092AppDataLocalProgramsPythonPython38-32python.exe' -u -c 'import sys, setuptools, t
    okenize; sys.argv[0] = '"'"'C:\Users\sesa542092\AppData\Local\Temp\pip-install-94jbnbnl\python-snappy\setup.py'"'"'; __file__='"'"'C:\Users\sesa542092\AppData\Local\Temp\pip-install-94jbnbnl\python-snappy\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"' '"'"', '"'"' '"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:Userssesa542092AppDataLocalTemppip-record-8m6z8doginstall-record.txt' --single-version-externally-managed --compile --install-headers 'C:Userssesa542092AppDataLocalProgramsPythonPython38-32Includepython-snappy' Check the logs for full command output. 

    百度之后发现需要安装一个文件

    打开https://www.lfd.uci.edu/~gohlke/pythonlibs/  

     查看自己Python版本是3.8,对应cp38

    下载的python_snappy-0.5.4-cp38-cp38-win32.whl

    终端pip install python_snappy-0.5.4-cp38-cp38-win32.whl

    解决

    以上。

  • 相关阅读:
    windows 按时自动化任务
    Linux libusb 安装及简单使用
    Linux 交换eth0和eth1
    I.MX6 GPS JNI HAL register init hacking
    I.MX6 Android mmm convenient to use
    I.MX6 GPS Android HAL Framework 调试
    Android GPS GPSBasics project hacking
    Python windows serial
    【JAVA】别特注意,POI中getLastRowNum() 和getLastCellNum()的区别
    freemarker跳出循环
  • 原文地址:https://www.cnblogs.com/jianxuandie/p/13904873.html
Copyright © 2011-2022 走看看