我需要摆脱/Library/Frameworks/Python.framework/Versions/2.7/bin
我$PATH
在 Mac OS X Lion 上的变量。我打开了几个文件,它们在路径中添加了一些内容,但没有找到添加 python 路径的位置。这是几个文件和路径变量的输出:
echo $PATH
返回
/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/Users/friedrich/.rvm/gems/ruby-1.9.3-p362/bin:/Users/friedrich/.rvm/gems/ruby-1.9.3-p362@global/bin:/Users/friedrich/.rvm/rubies/ruby-1.9.3-p362/bin:/Users/friedrich/.rvm/bin:/Users/friedrich/.rbenv/shims:/Users/friedrich/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/usr/local/git/bin
文件/etc/paths/
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
文件~/.profile
export PATH=$PATH:/usr/local/git/bin:/usr/local/Cellar/todo-txt/2.9/bin
文件~/.bash_profile
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# todo.txt script path
source /usr/local/Cellar/todo-txt/2.9/etc/bash_completion.d/todo_completion complete -F _todo t
# MacPorts Installer addition on 2013-03-01_at_21:26:56: 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.
最后一个向路径添加内容的文件似乎正在.bash_profile
添加export PATH=/opt/local/bin:/opt/local/sbin:$PATH
,所以我需要在此之前添加一些内容的文件。