Link to home
Start Free TrialLog in
Avatar of sharingsunshine
sharingsunshineFlag for United States of America

asked on

Changing $PATH variable - OS X

I am trying to update my $Path variable.  However, I am getting the message the executable needs to be in the PATH.

I used this command to update the path
echo 'export PATH=/Users/rjw/Documents/Python' >>~/.bash_profile

Open in new window


But when you look at echo $PATH you get the following without my path above.

export PATH=${PATH}:~/android-sdk-mac/tools
export PS1="rjw "
export PATH="/usr/local/mysql/bin:$PATH"
alias ll='ls -lahG'
export PATH=/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/rjw/android-sdk-mac/tools:/usr/local/mysql/bin

export PATH=/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/rjw/android-sdk-mac/tools:/usr/local/mysql/bin:/usr/local/mysql/bin

export PATH=/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/rjw/android-sdk-mac/tools:/usr/local/mysql/bin:/usr/local/mysql/bin

##
# Your previous /Users/rjw/.bash_profile file was backed up as /Users/rjw/.bash_profile.macports-saved_2016-01-13_at_10:05:16
##

# MacPorts Installer addition on 2016-01-13_at_10:05:16: adding an appropriate PATH variable for use with MacPorts.
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
# Finished adapting your PATH environment variable for use with MacPorts.


##
# Your previous /Users/rjw/.bash_profile file was backed up as /Users/rjw/.bash_profile.macports-saved_2016-07-26_at_16:54:01
##

# MacPorts Installer addition on 2016-07-26_at_16:54:01: adding an appropriate PATH variable for use with MacPorts.
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
# Finished adapting your PATH environment variable for use with MacPorts.


##
# Your previous /Users/rjw/.bash_profile file was backed up as /Users/rjw/.bash_profile.macports-saved_2016-07-26_at_17:07:46
##

# MacPorts Installer addition on 2016-07-26_at_17:07:46: adding an appropriate PATH variable for use with MacPorts.
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
# Finished adapting your PATH environment variable for use with MacPorts.


##
# Your previous /Users/rjw/.bash_profile file was backed up as /Users/rjw/.bash_profile.macports-saved_2016-07-26_at_17:13:45
##

# MacPorts Installer addition on 2016-07-26_at_17:13:45: adding an appropriate PATH variable for use with MacPorts.
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
# Finished adapting your PATH environment variable for use with MacPorts.
# Setting PATH for Python 3.5
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"
export PATH

Open in new window


I uninstalled macports if that is the problem and went to homebrew instead.
ASKER CERTIFIED SOLUTION
Avatar of serialband
serialband
Flag of Ukraine image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sharingsunshine

ASKER

that's what I needed.  The path is in and working.  Thanks for the help.

I had closed the terminal window and then restarted it but that didn't do it.  But using  source .bash_profile and changing to your path made it work.