手动安装的Python 2.7的未知屏幕输出

时间:2011-06-16 16:14:42

标签: python

我今天使用以下方法安装了Python 2.7:

./configure --prefix=/home/zhanwu/local --enable-shared --enable-profiling --with-pydebug
make install

然后我在每个函数调用后继续在屏幕上显示“[37745 refs]”:

[zhanwu@cluster ~]$ ~/local/bin/python
Python 2.7.1 (r271:86832, Jun 16 2011, 17:45:05) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
[37745 refs]
>>> print 'test'
test
[37745 refs]
>>> sys.exit()
[18048 refs]
[zhanwu@cluster ~]$ 

这些数字是什么意思?这里有什么问题,我可以摆脱它们吗?

uname -a result:

[zhanwu@cluster ~]$ uname -a
Linux cluster.xxx.xxx.xxx 2.6.18-128.1.14.el5 #1 SMP Wed Jun 17 06:38:05 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

1 个答案:

答案 0 :(得分:10)

您得到这些是因为您使用--with-pydebug配置了构建。它们表示Python目前正在跟踪的引用数量。要摆脱它们,请在没有--with-pydebug的情况下进行配置。