Error installing python-snappy: snappy-c.h: No such file or directory

后端 未结 12 1345
感动是毒
感动是毒 2020-12-08 06:36

I am using amazon ec2 ubuntu 11.04 server

 sudo pip install python-snappy 

also I tried to downloaded package and entered \"sudo python set

相关标签:
12条回答
  • 2020-12-08 06:45

    for Oracle Linux with Python 3.X:

    you need to enable optional_latest repository as a first step,

    1. use for enabling the following repo

      $ yum-config-manager --enable ol7_optional_latest

      "ol7_optional_latest" repo will be enabled for yum lookup.

    2. then install packages using,

      $ yum -y install gcc gcc-c++ snappy snappy-devel

    3. then with pip install the python-snappy package,

      $ pip3 install python-snappy

    0 讨论(0)
  • 2020-12-08 06:50

    You can install Snappy C library with following commands:

    DEB-based: sudo apt-get install libsnappy-dev

    RPM-based: sudo yum install libsnappy-devel

    Brew: brew install snappy

    0 讨论(0)
  • 2020-12-08 06:52

    You need Snappy C library

    Then you have to install python-snappy wrapper.

    It seems you didn't install Snappy-C library

    Try it ..as already a fellow commented for your post

    UPDATE: See more highly upvoted post below, which includes instructions to install on DEB-based, RPM-based, and Mac OS (Brew).

    0 讨论(0)
  • 2020-12-08 06:53

    I had some trouble getting snappy to install. Finally downloaded the pre-build stuff as offered by https://www.lfd.uci.edu/~gohlke/pythonlibs/ and all went well. (Unofficial Windows Binaries for Python Extension Packages)

    0 讨论(0)
  • 2020-12-08 06:54

    To solve this issue in Mac OS X with MacPorts installed, you can do:

    $ sudo port install snappy
    $ CPPFLAGS="-I/opt/local/include -L/opt/local/lib" pip install python-snappy
    
    0 讨论(0)
  • 2020-12-08 06:58

    According to the repo

    How to install it on Mac OS X?

    It has been reported a few times (Issue #7 and #23) that it can't be installed correctly the library in Mac. The procedure should be,

    $ brew install snappy # snappy library from Google 
    $ CPPFLAGS="-I/usr/local/include -L/usr/local/lib" pip install python-snappy
    
    0 讨论(0)
提交回复
热议问题