Tianhao Xu
Tianhao Xu

Reputation: 11

echo $PATH does not reflect my bash_profile after python modification

I recently checked my .bash_profile under/Users/tianhao which have been modified to following:

# Setting PATH for Python 3.5
# The orginal version is saved in .bash_profile.pysave
# PATH="${PATH}"
# export PATH
# export PATH=’/usr/local/bin:/"

/Users/tianhaoxu/.bash_profile (END)

this does not match my echo $PATH command result:

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin

I want to know why it doesn't match and all the lines are starting with #. I installed python3.5 by homebrew, which does not have any issues when I run brew doctor

Thank you in advance!!!

Upvotes: 1

Views: 317

Answers (1)

user3239558
user3239558

Reputation: 1827

Just as Rober said , # is a comment, it can't set path, if you want to set, you should remove # in the front. I think

 "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin" 

is set by the system default. Give you an example, if you want to add "home/tianhao/important/document" into you path, you can set(different pathes should be separated by colon)

PATH=$PATH:home/tianhao/important/document
export PATH

Upvotes: 1

Related Questions