如何检查哪个编译器用于构建Python [英] how to check which compiler was used to build Python
本文介绍了如何检查哪个编译器用于构建Python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法告诉哪个编译器用于在特定linux机器上构建 Python
?
Is there a way to tell which compiler was used to build a Python
install on a specific linux machine?
我尝试在 Python
动态库[1]使用 ldd
,但我没有设法了解if它是用 gcc
或英特尔编译器编译的。
I tried using ldd
on the Python
dynamic libraries [1], but I didn't manage to understand if it was compiled with gcc
or Intel compiler.
[1]
$ ldd libpython2.7.so.1.0
linux-vdso.so.1 => (0x00007fff4a5ff000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002ab8de8ae000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002ab8deac9000)
libutil.so.1 => /lib64/libutil.so.1 (0x00002ab8deccd000)
libm.so.6 => /lib64/libm.so.6 (0x00002ab8deed1000)
libc.so.6 => /lib64/libc.so.6 (0x00002ab8df154000)
/lib64/ld-linux-x86-64.so.2 (0x0000003b9a400000)
推荐答案
我认为你在 sys.version
中有它:
>>> import sys
>>> print(sys.version)
3.2.3 (default, Oct 19 2012, 19:53:16)
[GCC 4.7.2]
通常还应该在启动交互式解释器时告诉您:
It should also usually tell you when you start the interactive interpreter:
wim@wim-zenbook:~$ python3
Python 3.2.3 (default, Oct 19 2012, 19:53:16)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
这篇关于如何检查哪个编译器用于构建Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文