• Uncategorized

About python : An-error-occurs-when-installing-pylibmc-via-pip3-opensuse-Tumbleweed-distribution

Question Detail

Hello when I attempt to install pylibmc on openSUSE Tumbleweed using pip I get the following error:

 Using legacy 'setup.py install' for pylibmc, since package 'wheel' is not installed.
    Installing collected packages: pylibmc
        Running setup.py install for pylibmc ... error
        ERROR: Command errored out with exit status 1:
         command: /usr/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fra8rwmu/pylibmc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fra8rwmu/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-9bik3uxl/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/pylibmc
             cwd: /tmp/pip-install-fra8rwmu/pylibmc/
        Complete output (24 lines):
        /tmp/pip-install-fra8rwmu/pylibmc/setup.py:98: DeprecationWarning: 'U' mode is deprecated
          with open("README.rst", "U", encoding="utf-8") as r:
        /tmp/pip-install-fra8rwmu/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/test.py -> build/lib.linux-x86_64-3.8/pylibmc
        copying src/pylibmc/pools.py -> build/lib.linux-x86_64-3.8/pylibmc
        copying src/pylibmc/consts.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/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/__init__.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
        gcc -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -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
        unable to execute 'gcc': No such file or directory
        error: command 'gcc' failed with exit status 1
        ----------------------------------------
    ERROR: Command errored out with exit status 1: /usr/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fra8rwmu/pylibmc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fra8rwmu/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-9bik3uxl/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/pylibmc Check the logs for full command output.

The distribution has just been installed

Question Answer

if someone is interested in the solution, then you need to deliver the necessary packages, namely, in my case

zypper in python38-devel libmemcached-devel zlib-devel gcc

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.