Error when install pylibmc using pip

前端 未结 10 1303
灰色年华
灰色年华 2021-01-31 01:22

Hello when I attempt to install pylibmc on OSX Lion using pip I get the following error:

./_pylibmcmodule.h:42:10: fatal error: \'libmemcached/memcached.h\' file         


        
相关标签:
10条回答
  • 2021-01-31 01:38

    i fixed this by installing memcached from port

    you should install first macports from http://www.macports.org/

    then run this command

    sudo port install memcached
    

    after that download the pylibmc from the pypi http://pypi.python.org/pypi/pylibmc extract .tar.gz file then

    python setup.py install --with-libmemcached=/opt/local
    
    0 讨论(0)
  • 2021-01-31 01:44

    Answer for Ubuntu users:

    sudo apt install libmemcached-dev zlib1g-dev
    
    0 讨论(0)
  • 2021-01-31 01:46

    libmemcached may also be installed using Homebrew.

    brew install libmemcached
    

    After that, pip install pylibmc worked for me without needing to specify any additional arguments.

    0 讨论(0)
  • 2021-01-31 01:46

    this code is worked for me

      sudo apt-get install libmemcached-dev zlib1g-dev
    
      LIBMEMCACHED=/opt/local pip install pylibmc
    
    0 讨论(0)
  • 2021-01-31 01:48

    I solved this issue by checking where memcached is installed

    $ which memcached
    /usr/local/bin/memcached
    

    and then setting LIBMEMCACHED environment variable before pip install:

    $ export LIBMEMCACHED=/usr/local
    $ pip install pylibmc
    
    0 讨论(0)
  • 2021-01-31 01:50

    I have the same problem because i have installed MEMCACHED and not LIBMEMCACHED, so, to resolve:

    brew uninstall memcached #to remove wrong package
    
    brew install libmemcached #install correct lib
    
    pip install pylibmc
    

    Its Works for me!

    : )

    0 讨论(0)
提交回复
热议问题