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

筅森魡賤 提交于 2021-02-17 03:17:22

问题


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

回答1:


Set:

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

in your ~/.zshrc file.



来源:https://stackoverflow.com/questions/23978540/how-to-make-zsh-on-a-mac-10-9-use-python-2-7-6-instead-of-apples-preinstalled-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!