python升级2.7.13版本进入环境出现大量信息

python升级后检测版本出现加载信息
进入和退出python命令窗口都会提示大量信息
[root@python Python-2.7.13]# /usr/local/python2/bin/python2.7 -v

# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/local/python2/lib/python2.7/site.pyc matches /usr/local/python2/lib/python2.7/site.py
import site # precompiled from /usr/local/python2/lib/python2.7/site.pyc
# /usr/local/python2/lib/python2.7/os.pyc matches /usr/local/python2/lib/python2.7/os.py
import os # precompiled from /usr/local/python2/lib/python2.7/os.pyc
import errno # builtin
import posix # builtin
# /usr/local/python2/lib/python2.7/posixpath.pyc matches /usr/local/python2/lib/python2.7/posixpath.py
import posixpath # precompiled from /usr/local/python2/lib/python2.7/posixpath.pyc
# /usr/local/python2/lib/python2.7/stat.pyc matches /usr/local/python2/lib/python2.7/stat.py
import stat # precompiled from /usr/local/python2/lib/python2.7/stat.pyc
# /usr/local/python2/lib/python2.7/genericpath.pyc matches /usr/local/python2/lib/python2.7/genericpath.py
import genericpath # precompiled from /usr/local/python2/lib/python2.7/genericpath.pyc
# /usr/local/python2/lib/python2.7/warnings.pyc matches /usr/local/python2/lib/python2.7/warnings.py
import warnings # precompiled from /usr/local/python2/lib/python2.7/warnings.pyc
# /usr/local/python2/lib/python2.7/linecache.pyc matches /usr/local/python2/lib/python2.7/linecache.py
import linecache # precompiled from /usr/local/python2/lib/python2.7/linecache.pyc
# /usr/local/python2/lib/python2.7/types.pyc matches /usr/local/python2/lib/python2.7/types.py
import types # precompiled from /usr/local/python2/lib/python2.7/types.pyc
# /usr/local/python2/lib/python2.7/UserDict.pyc matches /usr/local/python2/lib/python2.7/UserDict.py
import UserDict # precompiled from /usr/local/python2/lib/python2.7/UserDict.pyc
# /usr/local/python2/lib/python2.7/_abcoll.pyc matches /usr/local/python2/lib/python2.7/_abcoll.py
import _abcoll # precompiled from /usr/local/python2/lib/python2.7/_abcoll.pyc
# /usr/local/python2/lib/python2.7/abc.pyc matches /usr/local/python2/lib/python2.7/abc.py
import abc # precompiled from /usr/local/python2/lib/python2.7/abc.pyc
# /usr/local/python2/lib/python2.7/_weakrefset.pyc matches /usr/local/python2/lib/python2.7/_weakrefset.py
import _weakrefset # precompiled from /usr/local/python2/lib/python2.7/_weakrefset.pyc
import _weakref # builtin
# /usr/local/python2/lib/python2.7/copy_reg.pyc matches /usr/local/python2/lib/python2.7/copy_reg.py
import copy_reg # precompiled from /usr/local/python2/lib/python2.7/copy_reg.pyc
# /usr/local/python2/lib/python2.7/traceback.pyc matches /usr/local/python2/lib/python2.7/traceback.py
import traceback # precompiled from /usr/local/python2/lib/python2.7/traceback.pyc
# /usr/local/python2/lib/python2.7/sysconfig.pyc matches /usr/local/python2/lib/python2.7/sysconfig.py
import sysconfig # precompiled from /usr/local/python2/lib/python2.7/sysconfig.pyc
# /usr/local/python2/lib/python2.7/re.pyc matches /usr/local/python2/lib/python2.7/re.py
import re # precompiled from /usr/local/python2/lib/python2.7/re.pyc
# /usr/local/python2/lib/python2.7/sre_compile.pyc matches /usr/local/python2/lib/python2.7/sre_compile.py
import sre_compile # precompiled from /usr/local/python2/lib/python2.7/sre_compile.pyc
import _sre # builtin
# /usr/local/python2/lib/python2.7/sre_parse.pyc matches /usr/local/python2/lib/python2.7/sre_parse.py
import sre_parse # precompiled from /usr/local/python2/lib/python2.7/sre_parse.pyc
# /usr/local/python2/lib/python2.7/sre_constants.pyc matches /usr/local/python2/lib/python2.7/sre_constants.py
import sre_constants # precompiled from /usr/local/python2/lib/python2.7/sre_constants.pyc
dlopen("/usr/local/python2/lib/python2.7/lib-dynload/_locale.so", 2);
import _locale # dynamically loaded from /usr/local/python2/lib/python2.7/lib-dynload/_locale.so
# /usr/local/python2/lib/python2.7/_sysconfigdata.pyc matches /usr/local/python2/lib/python2.7/_sysconfigdata.py
import _sysconfigdata # precompiled from /usr/local/python2/lib/python2.7/_sysconfigdata.pyc
import encodings # directory /usr/local/python2/lib/python2.7/encodings
# /usr/local/python2/lib/python2.7/encodings/__init__.pyc matches /usr/local/python2/lib/python2.7/encodings/__init__.py
import encodings # precompiled from /usr/local/python2/lib/python2.7/encodings/__init__.pyc
# /usr/local/python2/lib/python2.7/codecs.pyc matches /usr/local/python2/lib/python2.7/codecs.py
import codecs # precompiled from /usr/local/python2/lib/python2.7/codecs.pyc
import _codecs # builtin
# /usr/local/python2/lib/python2.7/encodings/aliases.pyc matches /usr/local/python2/lib/python2.7/encodings/aliases.py
import encodings.aliases # precompiled from /usr/local/python2/lib/python2.7/encodings/aliases.pyc
# /usr/local/python2/lib/python2.7/encodings/utf_8.pyc matches /usr/local/python2/lib/python2.7/encodings/utf_8.py
import encodings.utf_8 # precompiled from /usr/local/python2/lib/python2.7/encodings/utf_8.pyc
Python 2.7.13 (default, Jun 17 2017, 16:24:20) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

python环境退出提示如下

**>>> exit()**
# clear __builtin__._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.exitfunc
# clear sys.exc_type
# clear sys.exc_value
# clear sys.exc_traceback
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# clear sys.flags
# clear sys.float_info
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup __main__
# cleanup[1] encodings
# cleanup[1] site
# cleanup[1] sysconfig
# cleanup[1] abc
# cleanup[1] _weakrefset
# cleanup[1] sre_constants
# cleanup[1] re
# cleanup[1] _codecs
# cleanup[1] _warnings
# cleanup[1] zipimport
# cleanup[1] _sysconfigdata
# cleanup[1] encodings.utf_8
# cleanup[1] codecs
# cleanup[1] _locale
# cleanup[1] signal
# cleanup[1] traceback
# cleanup[1] posix
# cleanup[1] encodings.aliases
# cleanup[1] exceptions
# cleanup[1] _weakref
# cleanup[1] sre_compile
# cleanup[1] _sre
# cleanup[1] sre_parse
# cleanup[2] copy_reg
# cleanup[2] posixpath
# cleanup[2] errno
# cleanup[2] _abcoll
# cleanup[2] types
# cleanup[2] genericpath
# cleanup[2] stat
# cleanup[2] warnings
# cleanup[2] UserDict
# cleanup[2] os.path
# cleanup[2] linecache
# cleanup[2] os
# cleanup sys
# cleanup __builtin__
# cleanup ints: 19 unfreed ints
# cleanup floats

这是由于环境变量的问题导致的
设置环境变量即可

# vim /etc/profile.d/python2.sh
# cat /etc/profile.d/python2.sh

PYTHON_HOME=/usr/local/python2
export PATH=$PYTHON_HOME/bin:$PATH
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值