Installing graph-tool on python 3.10

I am using a linux server which has python 3.6.9 and python 3.10 installed. Whenever I run python3, it loads python 3.6.9. The apt-get install python3-graph-tool installs graph-tool on python 3.6.9, not on python 3.10.

Would it be possible to install graph-tool on python 3.10 by cloning the git repository and running the following lines?

./configure --prefix=/usr/local --with-python-module-path=/usr/local/lib/python3.10/site-packages
make install

Yes, it’s possible to compile with a custom python version the way you are suggesting. But it is important that the boost-python library is also compiled and linked against the exact same python version.

I much easier alternative to this is to install via conda. I recommend you try this first.