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)
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 librarymake
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:
@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:
For Python 3 at the system level use
pip3
on Fedora:You should see the python setup find the compiled C client you checked out:
And you should NOT see the python setup using the downloaded C client: