Search code examples
graph-databasesmemgraphdb

Trying to install pymgclient with poetry package manager


I tried to install pymgclient with poetry package manager. However, when installing pymgclient, I get the subsequent error:

   x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DMGCLIENT_STATIC_DEFINE= -I/tmp/pip-req-build-mkeehpn7/build/temp.linux-x86_64-3.9/mgclient_install/include -I/home/josip/Memgraph-Repos/feature-not-bug/.venv/include -I/usr/include/python3.9 -c src/column.c -o build/temp.linux-x86_64-3.9/src/column.o

In file included from src/column.c:15:
src/column.h:18:10: fatal error: Python.h: No such file or directory
18 | #include <Python.h>
|          ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

I suppose the problem is somehow linked to the python3 version I suppose, I currently have python version 3.9.5.


Solution

  • pymgclient requires python-dev package to be installed (on Ubuntu/Debian). To make this work, please run (on Ubuntu/Debian): • sudo apt install python-devorsudo apt install python3.9-dev (in case a specific python version is used) All the details could be found here Introduction — pymgclient 1.0.0 documentation