简体   繁体   中英

How to make zsh on a mac 10.9 use python 2.7.6 instead of Apple's preinstalled 2.7.5

How do I make zsh on a mac use python 2.7.6 which I have in my /usr/local/bin/python instead of python 2.7.5 which is in /usr/bin/python? (without needing to type /usr/local/bin/python before the script I want to run). My path setting on .zprofile is:

# Setting PATH for Python 2.7
# The orginal version is saved in .zprofile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH

Set:

export PATH="/usr/local/bin:$PATH"

in your ~/.zshrc file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM