aerospike-client-python icon indicating copy to clipboard operation
aerospike-client-python copied to clipboard

error: Linux distribution not supported: 'archlinux_unknown'

Open George3d6 opened this issue 7 years ago • 12 comments

When trying to install aerospike via sudo pip3 install --upgrade aerospike

I get the following error:

    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-8fyrk27g/aerospike/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-47fdbw1j-record/install-record.txt --single-version-externally-managed --compile:
    info: Executing ./scripts/aerospike-client-c.sh
    error: Linux distribution not supported: 'archlinux_unknown'
    error: scripts/aerospike-client-c.sh 1

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-8fyrk27g/aerospike/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-47fdbw1j-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-8fyrk27g/aerospike/

George3d6 avatar Nov 27 '17 15:11 George3d6

It should be noted I already have the C aerospike client installed on my machine, so I guess the issue here would be providing an install script that doesn't try to source the client but rather looks for it on the hosts machine first. Unless I may be doing something horribly wrong when installing.

George3d6 avatar Nov 27 '17 16:11 George3d6

Try this: https://github.com/aerospike/aerospike-client-python/blob/master/BUILD.md#building-on-an-unsupported-linux-distro

Basically, setting the following environment variables:

export DOWNLOAD_C_CLIENT=0
export AEROSPIKE_C_HOME=/path/to/aerospike-c-client
export AEROSPIKE_LUA_PATH=/path/to/aerospike-lua-core/src

brunneis avatar Nov 27 '17 18:11 brunneis

I'm away from my laptop right now, I will try this first thing tomorrow and close the issue if it works, though it would be nice to add that info to the unsupported distro error message.

George3d6 avatar Nov 27 '17 18:11 George3d6

I guess no one thought about letting the python lib have a pure python backoff instead of forcefully shoving the C lib at everyone. "Performance first" even if it does not install lol.

ixaxaar avatar Jun 01 '18 12:06 ixaxaar

Feel free to contribute code, but maybe your contribution is a joke so good you made yourself laugh? Hard to tell.

rbotzer avatar Jun 01 '18 13:06 rbotzer

Nah, its frustrating to the point that it becomes funny (after some headbanging of course). Maybe devrant is the better place for that :/

ixaxaar avatar Jun 06 '18 03:06 ixaxaar

With pip (>=19.0) and latest python client (>=3.8.0), you should be able to install on linux without needing to clone the c client or install any other dependencies anymore.

marknaero avatar Sep 03 '19 20:09 marknaero

Well, it's broken for me at least..

┌[20:35:33] felixoid@ig-fel:~/OPT/Felixoid/github/ClickHouse/ClickHouse venv=(venv3) [dddl_replication_check|✚1…4]
└>±> pip --version
pip 20.0.2 from /home/felixoid/OPT/Felixoid/github/ClickHouse/ClickHouse/venv3/lib/python3.8/site-packages/pip (python 3.8)
┌[20:35:34] felixoid@ig-fel:~/OPT/Felixoid/github/ClickHouse/ClickHouse venv=(venv3) [dddl_replication_check|✚1…4]
└>±> python --version
Python 3.8.3
┌[20:35:39] felixoid@ig-fel:~/OPT/Felixoid/github/ClickHouse/ClickHouse venv=(venv3) [dddl_replication_check|✚1…4]
└>±> pip install aerospike
Collecting aerospike
  Using cached aerospike-3.10.0.tar.gz (149 kB)
Building wheels for collected packages: aerospike
  Building wheel for aerospike (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/felixoid/OPT/Felixoid/github/ClickHouse/ClickHouse/venv3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jmm0dpcx/aerospike/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jmm0dpcx/aerospike/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-j38sjaz2
       cwd: /tmp/pip-install-jmm0dpcx/aerospike/
  Complete output (3 lines):
  info: Executing ./scripts/aerospike-client-c.sh
  error: Linux distribution not supported: 'arch'
  error: scripts/aerospike-client-c.sh 1
  ----------------------------------------
  ERROR: Failed building wheel for aerospike
  Running setup.py clean for aerospike
Failed to build aerospike
Installing collected packages: aerospike
    Running setup.py install for aerospike ... error
    ERROR: Command errored out with exit status 1:
     command: /home/felixoid/OPT/Felixoid/github/ClickHouse/ClickHouse/venv3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jmm0dpcx/aerospike/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jmm0dpcx/aerospike/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-64m65crv/install-record.txt --single-version-externally-managed --compile --install-headers /home/felixoid/OPT/Felixoid/github/ClickHouse/ClickHouse/venv3/include/site/python3.8/aerospike
         cwd: /tmp/pip-install-jmm0dpcx/aerospike/
    Complete output (3 lines):
    info: Executing ./scripts/aerospike-client-c.sh
    error: Linux distribution not supported: 'arch'
    error: scripts/aerospike-client-c.sh 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/felixoid/OPT/Felixoid/github/ClickHouse/ClickHouse/venv3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jmm0dpcx/aerospike/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jmm0dpcx/aerospike/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-64m65crv/install-record.txt --single-version-externally-managed --compile --install-headers /home/felixoid/OPT/Felixoid/github/ClickHouse/ClickHouse/venv3/include/site/python3.8/aerospike Check the logs for full command output.
WARNING: You are using pip version 20.0.2; however, version 20.1.1 is available.
You should consider upgrading via the '/home/felixoid/OPT/Felixoid/github/ClickHouse/ClickHouse/venv3/bin/python -m pip install --upgrade pip' command.

Felixoid avatar May 22 '20 18:05 Felixoid

Hi @Felixoid, The Python client doesn't officially support python3.8 yet so there isn't a manylinux2010 wheel for it on pip. The build script instead tries to build the Python client which requires the Aerospike C client. The C client does not officially support Arch so the build script tries to pull a C client artifact that doesn't exist and fails. You can get around this a few ways, using Python <= 3.7 should work, or, manually build the Python client and C client. This issue should be fixed when official 3.8 support is released (soon).

dwelch-spike avatar May 22 '20 19:05 dwelch-spike

Seems like this is still an issue:

pip install aerospike
Defaulting to user installation because normal site-packages is not writeable
Collecting aerospike
  Downloading aerospike-4.0.0.tar.gz (154 kB)
     |████████████████████████████████| 154 kB 3.0 MB/s 
Building wheels for collected packages: aerospike
  Building wheel for aerospike (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8ak0kdhk/aerospike/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8ak0kdhk/aerospike/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-2ilswkgi
       cwd: /tmp/pip-install-8ak0kdhk/aerospike/
  Complete output (3 lines):
  info: Executing ./scripts/aerospike-client-c.sh
  error: Linux distribution not supported: 'arch'
  error: scripts/aerospike-client-c.sh 1
  ----------------------------------------
  ERROR: Failed building wheel for aerospike
  Running setup.py clean for aerospike
Failed to build aerospike
Installing collected packages: aerospike
    Running setup.py install for aerospike ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8ak0kdhk/aerospike/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8ak0kdhk/aerospike/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-j0i39q6n/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/sakebomb/.local/include/python3.8/aerospike
         cwd: /tmp/pip-install-8ak0kdhk/aerospike/
    Complete output (3 lines):
    info: Executing ./scripts/aerospike-client-c.sh
    error: Linux distribution not supported: 'arch'
    error: scripts/aerospike-client-c.sh 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8ak0kdhk/aerospike/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8ak0kdhk/aerospike/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-j0i39q6n/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/sakebomb/.local/include/python3.8/aerospike Check the logs for full command output.

sakebomb avatar Nov 06 '20 15:11 sakebomb

Hi @sakebomb ,

Looks like there was an issue publishing the manylinux wheels for the last release so the client was building from source. The install should work now. Please give it another try, with the pip --no-cache flag to make sure the wheel is pulled.

dwelch-spike avatar Nov 06 '20 20:11 dwelch-spike

That worked! Thank you @dwelch-spike

sakebomb avatar Nov 06 '20 20:11 sakebomb