打开.bash_profile文件
open -e ~/.bash_profile
编辑:增减自己的各软件配置
export M2_HOME=/Users/lizhen/apache-maven-3.5.4
export PATH=$PATH:$M2_HOME/binPATH=$PATH:/usr/local/mysql/bin
# JAVA
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-18.0.2.jdk/Contents/Home
# Android SDK
export ANDROID_HOME=/Users/lizhen/Library/Android/sdk
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-tools# Setting PATH for Python 3.8
# The original version is saved in .bash_profile.pysave
# PATH="/Library/Frameworks/Python.framework/Versions/3.8/bin:${PATH}"
# export PATH#Python 3.8
export Py_PATH="/Library/Frameworks/Python.framework/Versions/3.8/bin"
export PATH=${PATH}:${Py_PATH}
alias python=${Py_PATH}/python3.8
alias pip=${Py_PATH}/pip3
# Added by Toolbox App
export PATH="$PATH:/usr/local/bin"
#protobuf 21.12
export PROTOBUF=/usr/local/protobuf
export PATH=$PROTOBUF/bin:$PATH#mongoDB
PATH=${PATH}:/usr/local/mongodb-osx-x86_64-4.0.28/bin
重载文件
source ~/.bash_profile
文章来源地址https://www.toymoban.com/news/detail-739148.html文章来源:https://www.toymoban.com/news/detail-739148.html
到了这里,关于mac 配置环境变量 .bash_profile文件的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!