0
something very wrong is happening with my environment set up. As I am trying to learn, I decided to reinstall Mac OSX El Capitan on my Macbook Pro and start installing and configuring stuff from scratch. Shell I am using is ZSH and I have configured it a bit with Oh-My-ZShell.
My $PATH and Python:
~ ❯ echo $PATH
/Users/edchigliak/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/edchigliak/bin
~ ❯ python --version
Python 2.7.10
~ ❯
Screenshot below clearly shows that there are two Python2's installed in /usr/bin
and a Homebrewed Python3 in /usr/local/bin
.
Here is the result of printenv
(only entries related to PATH and SHELL):
PATH=/Users/edchigliak/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/edchigliak/bin
PWD=/Users/edchigliak
SHELL=/usr/local/bin/zsh
SHLVL=2
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.lRGo5iu4NA/Listeners
TERM=screen-256color
ZSH=/Users/edchigliak/.oh-my-zsh
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
_=/usr/bin/printenv
First entry in my .zshrc
:
export PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/bin
Many thanks!
None of these are called literally
python
which is the command you are typing in. What do you get withtype python
? – tripleee – 2018-04-13T11:30:20.180@tripleee Hey thx for the quick reply. I get this
python is /usr/bin/python
– Alex Starbuck – 2018-04-13T12:18:54.7201It's not entirely clear why you think this result is "wrong". – tripleee – 2018-04-13T12:42:34.397
I think it is wrong because I changed my
$PATH
in.zshrc
file toexport PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
and thought thatwhich python
should now return python 3xx – Alex Starbuck – 2018-04-13T12:46:08.310It should not; only
which python3.xx
could possibly return that result. – tripleee – 2018-04-13T13:27:22.453