1

I need to run gdb with python script, like ~/.gdb/qtprinters.py which require a high version python.

our system gdb use default python version 2.7 and I installed a new gdb in my home with version 12.1 and also install an anaconda3 tool, but seems I cannot change the python version which gdb(12.1) use, when I configure to use a new python version with gdb, it will failed to make and compile as below:

./configure --with-python=/home/bob/tools/anaconda3/bin/python3.8 && make

The error message is like:

configure: error: no usable python found at /home/bob/tools/anaconda3/bin/python CXXLD gdbreplay make[1]: *** [Makefile:12137: configure-gdb] Error 1

but when configure to use the system default python version as below, the gdb(12.1) can be installed successfully as below:

./configure --with-python=/usr/bin/python && make
1
  • I just found that do not use python in anaconda3 but python in other places, like with this command, it can compile through ./configure --with-python=/home/bob/python/3.8.7/bin/python Commented Jun 6, 2022 at 12:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.