aerospike-client-python: unable to import aerospike

After installing python client for aerospike, I am unable to import it. I am using the openssl 1.1.0g on ubuntu 18.04.


>>> import aerospike
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/local/lib/python3.6/dist-packages/aerospike.cpython-36m-x86_64-linux-gnu.so: undefined symbol: SSLv23_client_method

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 20 (8 by maintainers)

Most upvoted comments

Hi @tarinders23, We don’t have a perfect solution yet, but are working on it.

For now, I would recommend manually building the C client: https://github.com/aerospike/aerospike-client-c which the Python client depends upon, and then installing the python client:

For safety first remove the current version of the python client, (Assuming it was installed with pip) pip uninstall aerospike git clone https://github.com/aerospike/aerospike-client-c.git cd aerospike-client-c/

Install the dependencies mentioned in the readme for that repo: https://github.com/aerospike/aerospike-client-c#build-prerequisites

git submodule update --init Build the C client library make

From the C client directory, pip install the aerospike python client, making sure not to use the cached version. AEROSPIKE_C_HOME=$PWD DOWNLOAD_C_CLIENT=0 pip install --no-cache-dir aerospike

It’s somewhat involved, but it should work. Let me know if the doesn’t fix the issue

The python client does not officially support python 3.8 yet. The origin of the “OS not supported” error can be seen here https://github.com/aerospike/aerospike-client-python/issues/250. You can get around this by manually building and installing the client via these directions.

Since this issue is closed please continue discussion at the open issue https://github.com/aerospike/aerospike-client-python/issues/255.

Thanks.

Cuirious if you have you tried this with python 3.7? I see that the error states that the OS is not supported, but do give it a try with 3.6 or 3.7.

On Thu, Feb 13, 2020, 4:55 AM pravin1406 notifications@github.com wrote:

Tried installing the python client on my system. Tried various solutions but nothing seems to work

Collecting aerospike Using cached https://files.pythonhosted.org/packages/62/e1/b33a0bcbb1f223fecb22bcfa70fd7add740ab96cc6ce1d083f14a429f2ca/aerospike-3.10.0.tar.gz ERROR: Command errored out with exit status 8: command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/private/var/folders/r8/839_4ptd2pq2c6s1z7gfdvbr0000gp/T/pip-install-4myvi98j/aerospike/setup.py’“'”‘; file=’“'”‘/private/var/folders/r8/839_4ptd2pq2c6s1z7gfdvbr0000gp/T/pip-install-4myvi98j/aerospike/setup.py’“'”‘;f=getattr(tokenize, ‘"’“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’"‘))’ egg_info --egg-base /private/var/folders/r8/839_4ptd2pq2c6s1z7gfdvbr0000gp/T/pip-install-4myvi98j/aerospike/pip-egg-info cwd: /private/var/folders/r8/839_4ptd2pq2c6s1z7gfdvbr0000gp/T/pip-install-4myvi98j/aerospike/ Complete output (1 lines): error: OS not supported: macOS-10.14.6-x86_64-i386-64bit

ERROR: Command errored out with exit status 8: python setup.py egg_info Check the logs for full command output.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aerospike/aerospike-client-python/issues/214?email_source=notifications&email_token=AF4J4CNFORDWJA4PURIYYB3RCUKKRA5CNFSM4E5NWKPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELUDPMY#issuecomment-585643955, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4J4CIJPTHS7GDT7VEYYTTRCUKKRANCNFSM4E5NWKPA .

@aerospikerobertmarks I can confirm this is still an issue in Fedora 29.

@jon2kx the workaround of compiling the C client and using it in the Python client setup is working for me on Fedora 29. Are you sure you compiled the C client correctly AND did the pip install from the C client directory?

For Python 3 in a virtual environment:

AEROSPIKE_C_HOME=$PWD DOWNLOAD_C_CLIENT=0 pip install --no-cache-dir aerospike

For Python 3 at the system level use pip3 on Fedora:

AEROSPIKE_C_HOME=$PWD DOWNLOAD_C_CLIENT=0 pip3 install --no-cache-dir aerospike

You should see the python setup find the compiled C client you checked out:

CHECK
       [✓] /home/micah/checkout/aerospike-client-c/target/Linux-x86_64/lib/libaerospike.a
       [✓] /home/micah/checkout/aerospike-client-c/target/Linux-x86_64/include/aerospike/aerospike.h

And you should NOT see the python setup using the downloaded C client:

CHECK
       [✓] /tmp/pip-install-ezabxmft/aerospike/aerospike-client-c/package/usr/lib/libaerospike.a
       [✓] /tmp/pip-install-ezabxmft/aerospike/aerospike-client-c/package/usr/include/aerospike/aerospike.h