py-sherlock / sherlock

Easy distributed locks for Python with a choice of backends.
MIT License
374 stars 35 forks source link

problem installing sherlock using pip #45

Closed beesuns closed 3 years ago

beesuns commented 3 years ago

After failed with requirements installation from git, I tried install sherlock using pip.

kali@kali:~$ pip install sherlock
Processing ./.cache/pip/wheels/e2/8a/e6/9dd9ea27202ac496d00828b36d9ed9805d092d6642ed1b1457/sherlock-0.3.2-py3-none-any.whl
Collecting pylibmc
  Using cached pylibmc-1.6.1.tar.gz (64 kB)
Processing ./.cache/pip/wheels/10/fa/7a/8ee59bc1789d1a1efffb172d6efbd0d24c5b85ec7ddce32ee4/python_etcd-0.4.5-py3-none-any.whl
Requirement already satisfied: redis in /usr/lib/python3/dist-packages (from sherlock) (3.3.11)
Requirement already satisfied: dnspython>=1.13.0 in /usr/lib/python3/dist-packages (from python-etcd->sherlock) (2.0.0)
Requirement already satisfied: urllib3>=1.7.1 in /usr/lib/python3/dist-packages (from python-etcd->sherlock) (1.25.9)
Building wheels for collected packages: pylibmc
  Building wheel for pylibmc (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5c19r3y0/pylibmc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5c19r3y0/pylibmc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-zitup5wn
       cwd: /tmp/pip-install-5c19r3y0/pylibmc/
  Complete output (28 lines):
  /tmp/pip-install-5c19r3y0/pylibmc/setup.py:98: DeprecationWarning: 'U' mode is deprecated
    with open("README.rst", "U", encoding="utf-8") as r:
  /tmp/pip-install-5c19r3y0/pylibmc/setup.py:100: DeprecationWarning: 'U' mode is deprecated
    with open("src/pylibmc-version.h", "U", encoding="utf-8") as r:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.8
  creating build/lib.linux-x86_64-3.8/pylibmc
  copying src/pylibmc/consts.py -> build/lib.linux-x86_64-3.8/pylibmc
  copying src/pylibmc/__init__.py -> build/lib.linux-x86_64-3.8/pylibmc
  copying src/pylibmc/test.py -> build/lib.linux-x86_64-3.8/pylibmc
  copying src/pylibmc/autoconf.py -> build/lib.linux-x86_64-3.8/pylibmc
  copying src/pylibmc/__main__.py -> build/lib.linux-x86_64-3.8/pylibmc
  copying src/pylibmc/client.py -> build/lib.linux-x86_64-3.8/pylibmc
  copying src/pylibmc/pools.py -> build/lib.linux-x86_64-3.8/pylibmc
  running build_ext
  building '_pylibmc' extension
  creating build/temp.linux-x86_64-3.8
  creating build/temp.linux-x86_64-3.8/src
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE_ZLIB -I/usr/include/python3.8 -c src/_pylibmcmodule.c -o build/temp.linux-x86_64-3.8/src/_pylibmcmodule.o -fno-strict-aliasing -std=c99
  In file included from src/_pylibmcmodule.c:34:                                                                                                                      
  src/_pylibmcmodule.h:42:10: fatal error: libmemcached/memcached.h: No such file or directory                                                                        
     42 | #include <libmemcached/memcached.h>                                                                                                                         
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                         
  compilation terminated.                                                                                                                                             
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1                                                                                                     
  ----------------------------------------                                                                                                                            
  ERROR: Failed building wheel for pylibmc
  Running setup.py clean for pylibmc
Failed to build pylibmc
Installing collected packages: pylibmc, python-etcd, sherlock
    Running setup.py install for pylibmc ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5c19r3y0/pylibmc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5c19r3y0/pylibmc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-wa897rmn/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/kali/.local/include/python3.8/pylibmc                                                                                                                    
         cwd: /tmp/pip-install-5c19r3y0/pylibmc/                                                                                                                      
    Complete output (28 lines):                                                                                                                                       
    /tmp/pip-install-5c19r3y0/pylibmc/setup.py:98: DeprecationWarning: 'U' mode is deprecated                                                                         
      with open("README.rst", "U", encoding="utf-8") as r:                                                                                                            
    /tmp/pip-install-5c19r3y0/pylibmc/setup.py:100: DeprecationWarning: 'U' mode is deprecated                                                                        
      with open("src/pylibmc-version.h", "U", encoding="utf-8") as r:                                                                                                 
    running install                                                                                                                                                   
    running build                                                                                                                                                     
    running build_py                                                                                                                                                  
    creating build                                                                                                                                                    
    creating build/lib.linux-x86_64-3.8                                                                                                                               
    creating build/lib.linux-x86_64-3.8/pylibmc                                                                                                                       
    copying src/pylibmc/consts.py -> build/lib.linux-x86_64-3.8/pylibmc                                                                                               
    copying src/pylibmc/__init__.py -> build/lib.linux-x86_64-3.8/pylibmc                                                                                             
    copying src/pylibmc/test.py -> build/lib.linux-x86_64-3.8/pylibmc                                                                                                 
    copying src/pylibmc/autoconf.py -> build/lib.linux-x86_64-3.8/pylibmc                                                                                             
    copying src/pylibmc/__main__.py -> build/lib.linux-x86_64-3.8/pylibmc                                                                                             
    copying src/pylibmc/client.py -> build/lib.linux-x86_64-3.8/pylibmc                                                                                               
    copying src/pylibmc/pools.py -> build/lib.linux-x86_64-3.8/pylibmc                                                                                                
    running build_ext                                                                                                                                                 
    building '_pylibmc' extension                                                                                                                                     
    creating build/temp.linux-x86_64-3.8                                                                                                                              
    creating build/temp.linux-x86_64-3.8/src                                                                                                                          
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE_ZLIB -I/usr/include/python3.8 -c src/_pylibmcmodule.c -o build/temp.linux-x86_64-3.8/src/_pylibmcmodule.o -fno-strict-aliasing -std=c99                                                                                    
    In file included from src/_pylibmcmodule.c:34:                                                                                                                    
    src/_pylibmcmodule.h:42:10: fatal error: libmemcached/memcached.h: No such file or directory                                                                      
       42 | #include <libmemcached/memcached.h>                                                                                                                       
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                       
    compilation terminated.                                                                                                                                           
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1                                                                                                   
    ----------------------------------------                                                                                                                          
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5c19r3y0/pylibmc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5c19r3y0/pylibmc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-wa897rmn/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/kali/.local/include/python3.8/pylibmc Check the logs for full command output.

Please help. Thanks!

peteriselksnis commented 3 years ago

apt-get install libmemcached-dev -y