export python=/usr/local/bin/python2.7 changing the path to
I am baffled by the following:
$ which python /usr/bin/python $ export python=/usr/local/bin/python2.7 $ which python /usr/bin/python
I'm using OSX v10.12.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
which determines the path of shell commands.
What you did in the second statement is set a variable named
Shell commands and variables are entirely different things.
What you'd might like to use is an alias.
Note, that (except in
tcsh, or if your
which is itself a shell function that invokes GNU
which, as recommended by its manual),
which will not show the alias, while e.g.
type python will.