f



why the final python --version result is 2.6.6 instead of 2.7?

[root@phrack bin]# pwd
/usr/local/bin
[root@phrack bin]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/go/bin
[root@phrack bin]# which python
/usr/local/bin/python
[root@phrack bin]# ll
total 6068
-rwxr-xr-x 1 root root     101 Oct  8 14:50 2to3
-rwxr-xr-x 1 root root      99 Oct  8 14:50 idle
-rwxr-xr-x 1 root root      84 Oct  8 14:50 pydoc
lrwxrwxrwx 1 root root       7 Oct  8 15:16 python -> python2
lrwxrwxrwx 1 root root       9 Oct  8 15:16 python2 -> python2.7
-rwxr-xr-x 1 root root 6162209 Oct  8 15:16 python2.7
-rwxr-xr-x 1 root root    1624 Oct  8 15:16 python2.7-config
lrwxrwxrwx 1 root root      16 Oct  8 15:16 python2-config -> python2.7-config
lrwxrwxrwx 1 root root      14 Oct  8 15:16 python-config -> python2-config
-rwxr-xr-x 1 root root   18547 Oct  8 14:50 smtpd.py
[root@phrack bin]# python --version
Python 2.6.6
[root@phrack bin]#
0
UTF
10/8/2014 3:26:52 PM
comp.unix.shell 15484 articles. 3 followers. Post Follow

5 Replies
675 Views

Similar Articles

[PageSpeed] 1

On 2014-10-08, 张加林 <cainiaocome@gmail.com> wrote:
> [root@phrack bin]# python --version
> Python 2.6.6
> [root@phrack bin]#

Do you get the same result if you run /usr/local/bin/python directly?

Did you, in the same shell session, run python, and then manipulate
the PATH to point to a different python?

Some shells hash path lookups; they do not resolve every command
through PATH, if it was recently executed.

In Bash, you can clear the cache of remembered command locations using
"hash -r".
0
Kaz
10/8/2014 5:53:03 PM
张加林 wrote:

> [root@phrack bin]# echo $PATH
> /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/go/bin
> [root@phrack bin]# which python
> /usr/local/bin/python

"which" has its uses, but is not the best tool here as it just looks
for python in your PATH.  You want to use a shell builtin such as "type"
(or "command -V") to take into account that python might be an alias or
function, or have had its path hashed (remembered from a previous PATH
lookup).

-- 
Geoff Clare <netnews@gclare.org.uk>
0
Geoff
10/9/2014 12:51:48 PM
=E5=9C=A8 2014=E5=B9=B410=E6=9C=888=E6=97=A5=E6=98=9F=E6=9C=9F=E4=B8=89UTC+=
8=E4=B8=8B=E5=8D=8811=E6=97=B627=E5=88=8643=E7=A7=92=EF=BC=8C=E5=BC=A0=E5=
=8A=A0=E6=9E=97=E5=86=99=E9=81=93=EF=BC=9A
> [root@phrack bin]# pwd
>=20
> /usr/local/bin
>=20
> [root@phrack bin]# echo $PATH
>=20
> /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/u=
sr/local/go/bin
>=20
> [root@phrack bin]# which python
>=20
> /usr/local/bin/python
>=20
> [root@phrack bin]# ll
>=20
> total 6068
>=20
> -rwxr-xr-x 1 root root     101 Oct  8 14:50 2to3
>=20
> -rwxr-xr-x 1 root root      99 Oct  8 14:50 idle
>=20
> -rwxr-xr-x 1 root root      84 Oct  8 14:50 pydoc
>=20
> lrwxrwxrwx 1 root root       7 Oct  8 15:16 python -> python2
>=20
> lrwxrwxrwx 1 root root       9 Oct  8 15:16 python2 -> python2.7
>=20
> -rwxr-xr-x 1 root root 6162209 Oct  8 15:16 python2.7
>=20
> -rwxr-xr-x 1 root root    1624 Oct  8 15:16 python2.7-config
>=20
> lrwxrwxrwx 1 root root      16 Oct  8 15:16 python2-config -> python2.7-c=
onfig
>=20
> lrwxrwxrwx 1 root root      14 Oct  8 15:16 python-config -> python2-conf=
ig
>=20
> -rwxr-xr-x 1 root root   18547 Oct  8 14:50 smtpd.py
>=20
> [root@phrack bin]# python --version
>=20
> Python 2.6.6
>=20
> [root@phrack bin]#

thank you all guys,it seems is the cache problem,after i reboot my machine =
it worked correctly.
yeah,,,i am the it crowd,reboot your machine...
0
UTF
10/9/2014 2:46:35 PM
Are you aware of newsgroup comp.lang.python, which may be a faster way to get information on any problem specific to Python?

0
Robert
10/13/2014 4:16:25 AM
In article <937d0114-3dca-43eb-a61d-a04fce45b2b1@googlegroups.com>,
 Robert Miles <robertmilesxyz@gmail.com> wrote:

> Are you aware of newsgroup comp.lang.python, which may be a faster way to get 
> information on any problem specific to Python?

His problem wasn't specific to Python, it was about how the shell finds 
executables. He could easily have had the same problem when installing a 
new version of Perl or some other utility.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
0
Barry
10/13/2014 4:54:17 PM
Reply:

Similar Artilces:

MySQLdb 1.2.2 + python 2.6.2
Hi all, Are MySQLdb 1.2.2 and python 2.6.2 compatible? I went to http://sourceforge.net/project/showfiles.php?group_id=22307, it doesn't say it is compatible or not. When trying to install MySQLdb 1.2.2 on my machine which is running python 2.6.2 and windows XP, I get this error below. I am able to install MySQLdb 1.2.2 successfully on another machine which is running python 2.5.4 and windows XP. Please help if you have any idea. C:\temp>easy_install MySQL_python-1.2.2-py2.5-win32.egg Processing MySQL_python-1.2.2-py2.5-win32.egg Removing c:\python26\lib\site-packages\MySQL_python-...

Upgrade from VO 1 - 2 - 2..1 -2.2 - 2.3 -2.4 - 2.5 - 2.6 - 2.7
About upgrade 2.5 - 2.7 at $ 384.00 For most products I'm using - the updates (2.0 - 2.1 - 2.7) are free... 2.0 to 3.0 might be worth + 10-30% of the original price? VO is + full price again & again - Full program price for every minor upgrade/bug-fix? I dropped out of the money/bugs [VO] at 2.5 after starting at 1.0 more than 10 years ago. Certainly whoever is making VO have to make a living; earning moneys: - that is OK! A 10 years old VO site; - 10 years later, how much have changed? http://www.yi.com/prany/cavo/cavofront.htm Even MS is not ...

OBIEE 11g with BI Apps 7.9.6.2/7.9.6.3 #2
Hi This is Mac Smith - Recruitment and Resources from SancroSoft USA Inc. We have an urgent requirement as follows: Please respond with resumes in MS-Word Format with the following details tomac@sancrosoftusa.com Call me 916-671-5584 Full Name: Location: Contact Number: Email: Availability: HR Rate: Visa Status: Relocation: Title : OBIEE 11g with BI Apps 7.9.6.2/7.9.6.3. Location : Sidney Ohio Local=92s Duration : 6+ Months Start Date : Skype interview tomorrow/Wednesday OBIEE 11g with BI Apps 7.9.6.2/7.9.6.3. We need urgently good profile with 5-8 years=92 experience who has experien...

Upgrade Python 2.6.4 to 2.6.5
Just upgraded on my Windows 7 machine my copy of 2.6.4 to 2.6.5. However doing sys.version still shows 2.6.4 even so python.exe is dated 19. March 2010 with a size of 26.624 bytes. Is this a known issue? Or did I do something wrong? If I install to a new folder all is well, but I would have to install all my other stuff again (kinterbasdb, matplotlib, sphinx etc etc). Werner Werner F. Bruhin wrote: > Just upgraded on my Windows 7 machine my copy of 2.6.4 to 2.6.5. > > However doing sys.version still shows 2.6.4 even so python.exe is dated > 19. March 2010 ...

[tao-announce] ACE 6.2.6/TAO 2.2.6 RPMs available on OBS
Hi, Through the OpenSuSE build service we are providing RPMs for ACE/TAO. We have updated OBS this morning, RPMs for the various distributions are appearing online. For more details see http://www.orbzone.org/node/344 Best regards, Johnny Willemsen Remedy IT Support and services for ATCD http://www.theaceorb.nl ...

[ace-announce] ACE 6.2.6/TAO 2.2.6 RPMs available on OBS
Hi, Through the OpenSuSE build service we are providing RPMs for ACE/TAO. We have updated OBS this morning, RPMs for the various distributions are appearing online. For more details see http://www.orbzone.org/node/344 Best regards, Johnny Willemsen Remedy IT Support and services for ATCD http://www.theaceorb.nl ...

[tao-users] ACE 6.2.6/TAO 2.2.6 RPMs available on OBS
Hi, Through the OpenSuSE build service we are providing RPMs for ACE/TAO. We have updated OBS this morning, RPMs for the various distributions are appearing online. For more details see http://www.orbzone.org/node/344 Best regards, Johnny Willemsen Remedy IT Support and services for ATCD http://www.theaceorb.nl ...

[ace-users] ACE 6.2.6/TAO 2.2.6 RPMs available on OBS
Hi, Through the OpenSuSE build service we are providing RPMs for ACE/TAO. We have updated OBS this morning, RPMs for the various distributions are appearing online. For more details see http://www.orbzone.org/node/344 Best regards, Johnny Willemsen Remedy IT Support and services for ATCD http://www.theaceorb.nl ...

voodoo spell VASHIKARAN specialist aghori baba 0/9/6/3/6/4/2/2/7/0/2
love vashikaran specialist aghori baba ji 09636422702 vashikaran mantra vashikaran specialist lost love back by vashikaran get your love vashikaran vazifa specialist +919636422702 the great vashikaran powered by vashikaran vazifa jadu tona black magic voodoo spell dispuat husband wife reletons vashikaranspecialistcall.com 09636422702 vashikaran specialist aghori baba 09636422702 love vashikaran specialist marriage problams get your love vashikaran vazifa specialist http://vashikaranspecialistcall.com lost love vashikaran mantra vashikaran mantra specialist aghori baba ji 9636422...

Float to String "%.7e"
When formatting a float using the exponential format, the rounding is different in Python-2.6 and Python-2.7. See example below. Is this intentional? Is there any way of forcing the Python-2.6 behavior (for compatibility reasons when testing)? >c:\python26\python r:\asiData\abaObjects\lib>c:\python26\python Python 2.6.5 (r265:79096, Mar 19 2010, 18:02:59) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> x = [2.096732130e+02,2.096732140e+02,2.096732150e+02,2.096732151...

Slow tcp handshakes rate of 2.6.20 or 2.6.18 (after 2.6.18.8)
Hi, In these days I met a strange situation, tcp handshake rate is slow after 2.6.18.8. Server accepts connections, and records number of successful tcp handshakes during last 10 seconds. Client tries to connect to server's listen port as fast as possible and as many as possible, or in simple words, connect() floods server. Server's performances varied, depending on which kernel it running. On 2.6.18, 10000 successful connections take about 30-40 seconds, while on 2.6.20 or 2.6.19, it will cost about more than 5 minutes. It seems there is some a mechanism which prevent ...

Upgrade of Xalan 1.2.2 and Xerces 1.4.4 to Xalan 2.6 and Xerces 2.6.2
I've been tasked with upgrading the JVM from 1.3 to 1.4, and the third party libraries used by my company on our existing Java framework. I'm most worried about any problems that may occur due to upgrading Xalan and Xerces as our framework performs much XML transformation and processing. Does anyone have a link to known issues with such an upgrade (besides the Xalan / Xerces sites) ? Or has anyone done such an upgrade and can share their pearls of wisdom? Thanks Chris ...

Error building Python 2.6.3 and 2.6.4rc2
HI! I'm on a openSUSE system where Python 2.6 is installed from RPMs. I'm trying to build Python from source separately. This used to work in former versions but fails now (see build traceback below). Anyone having a clue what's going on here? Is there a possible work-around? A possible conflict with the openSUSE-RPMs? Ciao, Michael. ----------------------------- snip ----------------------------- /usr/src/Python-2.6.4rc2> make 'import site' failed; use -v for traceback Traceback (most recent call last): File "./setup.py", line 15, in <module> f...

Python 2.6.6 release candidate 2 now available.
--Sig_/PKNvWqaBpeuTGYhtjU=bb5A Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hello fellow Python enthusiasts, The source tarballs and Windows installers for the second (and hopefully la= st) Python 2.6.6 release candidate is now available: http://www.python.org/download/releases/2.6.6/ We've had a handful of important fixes since rc1, and of course a huge numb= er of bugs have been fixed since 2.6.5, with the full NEWS file available here: http://www.python.org/download/releases/2.6.6/NEWS.txt We would love it if you can download, inst...

lxml 2.2.4 for Python 2.6
Is there any reason why lxml-2.2.4-py2.6-win32.egg (md5) or lxml-2.2.4.win32-py2.6.exe is not available? Best regards, /Srijit Hi, Srijit Kumar Bhadra wrote: > Is there any reason why lxml-2.2.4-py2.6-win32.egg (md5) or > lxml-2.2.4.win32-py2.6.exe is not available? > > Best regards, > /Srijit maybe ask on lxml Mailing List , should be more appropriated Sérgio M. B. ...

Web resources about - why the final python --version result is 2.6.6 instead of 2.7? - comp.unix.shell

Android version history - Wikipedia, the free encyclopedia
Global Android version distribution since December 2009. As of September 2013, Android 4.1/4.2 Jelly Bean is the most widely-used Android version, ...

Former Secretary of Defense Donald Rumsfeld releases new diabolical version of Solitaire for iOS
... of iOS Devices , Apps , and iPad . What do you think? Discuss "Former Secretary of Defense Donald Rumsfeld releases new diabolical version ...

PC users, get rid of Adobe Flash end of life versions
... The key finding of the UK Country Report says that 78 percent of users have Adobe Flash Player 19 installed. This is an end-of-life version ...

Apple could be working on its own version of Google's 'Street View'
Apple could be working on its own version of Google Street View, the service which offers an interactive view of any street. In a section of ...

Thomson Reuters wants to own fintech with its version of the App Store
... the structure of their businesses today than they were even a few years ago." Lojko runs the Eikon business, Thomson Reuters' software version ...

How Ray Stevenson Feels About Marvel Making A New Version Of The Punisher
There’s a lot of hype around Marvel’s Daredevil Season 2, which is heading to Netflix this spring. A lot of that hype stems from the fact that ...

EA Sports UFC 2 adds two versions of Mike Tyson as preorder bonus
You can play as Iron Mike Tyson and Legacy Mike Tyson.

Rob Liefeld Says Deadpool Movie Is Best Version Of Deadpool He Has Ever Experienced
As a writer, it can be extremely scary to give up a script to a director and watch them do as [...]

Would be the Democratic version of Donald Trump be ... Donald Trump?
So Donald Trump is creating real havoc in the GOP. While the choice of a small but real minority (in the 35 percent realm), a majority of the ...

Is Rob Manfred In Danger Of Becoming MLB's Version of Roger Goodell?
That the headline suggests an answer is unfortunate. And so is Rob Manfred's inability to put his new MLB domestic violence policy into effect ...

Resources last updated: 1/26/2016 10:40:23 AM