memgraph / pymgclient

Python Memgraph Client
https://memgraph.github.io/pymgclient/
Apache License 2.0
43 stars 5 forks source link

Issue with Ubuntu 22.04 duee to libssl-dev version #50

Closed trunksio closed 1 year ago

trunksio commented 1 year ago

When using ubuntu 22.04 and installing gqlalchemy with python 3.10 I get the following error:

from gqlalchemy import memgraph Traceback (most recent call last): File "", line 1, in File "/home/lewis/miniconda3/envs/gql/lib/python3.10/site-packages/gqlalchemy/init.py", line 34, in from gqlalchemy.instance_runner import ( # noqa F401 File "/home/lewis/miniconda3/envs/gql/lib/python3.10/site-packages/gqlalchemy/instance_runner.py", line 31, in from gqlalchemy.vendors.memgraph import Memgraph File "/home/lewis/miniconda3/envs/gql/lib/python3.10/site-packages/gqlalchemy/vendors/memgraph.py", line 19, in from gqlalchemy.connection import Connection, MemgraphConnection File "/home/lewis/miniconda3/envs/gql/lib/python3.10/site-packages/gqlalchemy/connection.py", line 18, in import mgclient ImportError: /home/lewis/miniconda3/envs/gql/lib/python3.10/site-packages/mgclient.cpython-310-x86_64-linux-gnu.so: undefined symbol: SSL_get1_peer_certificate

antaljanosbenjamin commented 1 year ago

I think this issue arises because of the miniconda environment (which ships its own OpenSSL version) not with Ubuntu 22.04. Unfortunately I am not aware of any solution that makes binary packages compatible with different OpenSSL library versions.

However there is a solution: install pymgclient from source. The documentation is a bit out of date, pymgclient supports OpenSSL 3, so there shouldn't be any issues. To be sure it uses the correct OpenSSL version, try to specify the environment variable OPENSSL_ROOT_DIR to point to the root of the miniconda environment, probably $HOME/miniconda3 should work.

Can you please try this?

trunksio commented 1 year ago

Hi - after many attempts I have abandoned miniconda and used the ubuntu python 3.10 packages and this is working for me now.