To pass terminal traffic through Burp, first open up Burp and then you should probably turn the Intercept off. At least, that is what I like to do.

We will be using Proxychains here.

So, first, let's configure it.
vi /etc/proxychains.conf

Go to the end and write,

http 8080
https 8080

Save and exit vi.

Now try running your command as,

proxychains python3