Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install older version of aerospike #268

Closed
Paulius-Maruska opened this issue Mar 1, 2021 · 3 comments
Closed

Unable to install older version of aerospike #268

Paulius-Maruska opened this issue Mar 1, 2021 · 3 comments

Comments

@Paulius-Maruska
Copy link

Paulius-Maruska commented Mar 1, 2021

I'm using command:

$ pip --version ; pip install aerospike==3.10.0

Note: I'm trying to run an older project made by someone else, this is the version specified in the requirements file - I'm not at liberty to update this.

This is what I get:

pip 21.0.1 from ********/venv/lib/python3.8/site-packages/pip (python 3.8)
Collecting aerospike==3.10.0
  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: ********/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-enb6w1hl/aerospike_caaab8f14fc9404aa5b3f7577e84605d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-enb6w1hl/aerospike_caaab8f14fc9404aa5b3f7577e84605d/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-gs0sxend
       cwd: /tmp/pip-install-enb6w1hl/aerospike_caaab8f14fc9404aa5b3f7577e84605d/
  Complete output (8 lines):
  info: Executing ./scripts/aerospike-client-c.sh
  info: downloading 'https://artifacts.aerospike.com/aerospike-client-c/4.6.10/aerospike-client-c-devel-4.6.10.ubuntu20.04.x86_64.deb' to '/tmp/pip-install-enb6w1hl/aerospike_caaab8f14fc9404aa5b3f7577e84605d/aerospike-client-c/package/aerospike-client-c-devel-4.6.10.ubuntu20.04.x86_64.deb'
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
    0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  curl: (22) The requested URL returned error: 404 Not Found
  error: Unable to download package from 'https://artifacts.aerospike.com/aerospike-client-c/4.6.10/aerospike-client-c-devel-4.6.10.ubuntu20.04.x86_64.deb'
  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: ********/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-enb6w1hl/aerospike_caaab8f14fc9404aa5b3f7577e84605d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-enb6w1hl/aerospike_caaab8f14fc9404aa5b3f7577e84605d/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-j3z64xon/install-record.txt --single-version-externally-managed --compile --install-headers ********/venv/include/site/python3.8/aerospike
         cwd: /tmp/pip-install-enb6w1hl/aerospike_caaab8f14fc9404aa5b3f7577e84605d/
    Complete output (8 lines):
    info: Executing ./scripts/aerospike-client-c.sh
    info: downloading 'https://artifacts.aerospike.com/aerospike-client-c/4.6.10/aerospike-client-c-devel-4.6.10.ubuntu20.04.x86_64.deb' to '/tmp/pip-install-enb6w1hl/aerospike_caaab8f14fc9404aa5b3f7577e84605d/aerospike-client-c/package/aerospike-client-c-devel-4.6.10.ubuntu20.04.x86_64.deb'
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
      0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    curl: (22) The requested URL returned error: 404 Not Found
    error: Unable to download package from 'https://artifacts.aerospike.com/aerospike-client-c/4.6.10/aerospike-client-c-devel-4.6.10.ubuntu20.04.x86_64.deb'
    error: scripts/aerospike-client-c.sh 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: ********/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-enb6w1hl/aerospike_caaab8f14fc9404aa5b3f7577e84605d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-enb6w1hl/aerospike_caaab8f14fc9404aa5b3f7577e84605d/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-j3z64xon/install-record.txt --single-version-externally-managed --compile --install-headers ********/venv/include/site/python3.8/aerospike Check the logs for full command output.

According to installation instructions:

If using the latest aerospike python client (>=3.8.0) and pip (>=19.0) on a linux system, only pip is required to install a pre-built manylinux2010 wheel. In this case, install pip if needed, then skip to the installation section.

So, my pip is definitely newer, and I'm attempting to install 3.10 which is also newer than 3.8 - so my understanding that this should work?

I also attempted to download and install 4.6.10 version of the C library (both lib and devel deb files), but that had no effect.

EDIT: forgot to mention - I'm on Ubuntu 20.04.2 LTS

@Paulius-Maruska
Copy link
Author

So the problem seems to be, that the package is trying to download file:

https://artifacts.aerospike.com/aerospike-client-c/4.6.10/aerospike-client-c-devel-4.6.10.ubuntu20.04.x86_64.deb
                                                                                                ^^^^^

But on the official C library download page the latest ubuntu version seems to be 18.04 (which is what I tried to install manually into my system).

So there is no 20.04 version. Which probably means that all your releases will break on any new version of linux that you did not build for at the time of release?

Is there an environment variable or a command line flag that I could specify to override what file your setup script should download? Or what version of linux it should use when constructing the download URL? Can I override any of it?

@Paulius-Maruska
Copy link
Author

Ok, so I figured this out myself, but I do think your installation instructions should mention this.

In order for the python package to use a manually installed aerospike C library, you need to set 2 environment variables:

# this is the default location
PREFIX=/usr

# disable any attempts to download packages from the internet
DOWNLOAD_C_CLIENT=-1

In other words - installation works, when I run:

$ PREFIX=/usr DOWNLOAD_C_CLIENT=-1 pip install aerospike==3.10.0

@dwelch-spike
Copy link
Contributor

Hi @Paulius-Maruska

There are a few things happening here. The Python client is normally installed with manylinux wheels that bundle dependencies, pypi has a manylinux wheel for each supported version of Python. However, Client 3.10.0 does not officially support Python 3.8, so there isn't a manylinux2010 wheel and pip defaults to a source install. As you observed, the setup.py looks for a corresponding C client artifact to download, since C client 4.6.10 did not support Ubu20, that artifact does not exist and the build fails. Documentation for building on unsupported distros is here, https://github.com/aerospike/aerospike-client-python/blob/master/BUILD.md#building-on-an-unsupported-linux-distro . Sorry you ran into this and thanks for sharing your solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants