-1

I updated gcc to v6 few weeks ago. Today i noticed that python2 and python3 both the interpreters were using gcc v5. Why does python interpreter show gcc v5 but I have gcc v6 installed? I am using xubuntu 16.

Here is my terminal: wrong interpreters!

Mohit Negi
  • 42
  • 2
  • 9
  • 2
    Thats the `gcc` version the program was compiled against. – heemayl Mar 01 '18 at 19:54
  • yeah, but why it didn't use gcc v6? – Mohit Negi Mar 01 '18 at 19:55
  • 1
    Did you expect Ubuntu to recompile python after you installed gcc 6? Ubuntu downloads a pre-compiled python executable from the repo and that's it. If you want to know why that executable was compiled with gcc 5, you'll have to ask the person who's responsible for python in the Ubuntu repository. – Aran-Fey Mar 01 '18 at 20:01
  • Python doesn't "use" GCC (not counting building C modules from source), you can run Python on a machine that doesn't even have GCC installed – UnholySheep Mar 01 '18 at 20:05

2 Answers2

1

On your platform, gcc-6 command is referring to GCC V6. gcc command is still referring to GCC V5,

Note: You can check it via typing gcc --version on terminal.

cse
  • 4,066
  • 2
  • 20
  • 37
0

Did you download python or build it yourself? If you download python binaries, it's already compiled and doesn't use your gcc.

If you want to compile python with gcc 6, download the cpython source from here and go wild.

T. McManus
  • 133
  • 1
  • 6