Connecting Memgraph with Python Driver

Hello there,

I have successfully installed and run memgraph on my local machine. How do I connect it with Python driver. Please share all the steps in detail.

1 Like

Hi @asadiqbal :smile:

You can now install our open-source library GQLAlchemy, which acts as a driver for Memgraph and offers additional features for Python development.

I suggest you take a look at this Jupyter Notebook, as it contains code that can help you get started.

Hello @idespot,

I pip installed the GQLAlchemy, and imported memgraph from it as in the notebook you shared. I’m getting this error. Please guide.

Note: python version == 3.9.7

1 Like

Hi @asadiqbal :slightly_smiling_face:

I have a few questions in order to investigate your problem deeper.

  • When you executed pip install gqlalchemy did you get any errors?
  • Could you try running pip install gqlalchemy==1.2.0 and posting the terminal output here?

Thanks @idespot,
I resolved the error by simply reinstalling the gqlalchemy with the command prompt. Now I have to load a csv from the directory on my local machine and run DFS algorithm. Please share your knowledge on that.

Please note that when I try to import csv with Memgraph Lab, it says “wrong extention”.