Mac平臺(tái)下git膛锭,HomeBrew、python安裝

日期:2020-09-20

Git版本控制器

git通常在編程中會(huì)用到蚊荣,通常是多個(gè)人同時(shí)協(xié)作一個(gè)項(xiàng)目初狰,有可能出現(xiàn)兩個(gè)人同時(shí)修改一個(gè)文件,這時(shí)后提交的人會(huì)遇到?jīng)_突互例,需要解決沖突奢入;git能夠記錄每個(gè)人的提交修改等形成日志,可以根據(jù)提交記錄進(jìn)行回滾媳叨;并且git支持分布式部署腥光。

Git下載?

https://www.git-scm.com/download/

安裝及其配置

傻瓜式安裝

最終git檢測(cè)是否安裝成功

-------------------------------------------------------------------------------------------------------------------------

HomeBrew

方法一:

梯子

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

方法二:

1.下載brew_install文件

curl-fsSL https://raw.githubusercontent.com/Homebrew/install/master/install>>brew_install

2.替換brew_install文件中的內(nèi)容

將文件中的BREW_REPO="https://github.com/Homebrew/brew”替換成BREW_REPO="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"

下載下來的brew_install文件是:

#!/usr/bin/rubySTDERR.print<<EOSWarning:The Ruby Homebrew installerisnow deprecatedandhas been rewritteninBash.Please migrate to the following command:/bin/bash-c"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"EOSKernel.exec"/bin/bash","-c",'/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"'

https://raw.githubusercontent.com/Homebrew/install/master/install.sh訪問這個(gè)地址。將內(nèi)容替換到文件中去糊秆,然后修改對(duì)應(yīng)的信息

PS Brew_install文件內(nèi)的信息

#!/bin/bashset -u# First check if the OS is Linux.if [[ "$(uname)" = "Linux" ]]; then HOMEBREW_ON_LINUX=1fi# On macOS, this script installs to /usr/local only.# On Linux, it installs to /home/linuxbrew/.linuxbrew if you have sudo access# and ~/.linuxbrew otherwise.# To install elsewhere (which is unsupported)# you can untar https://github.com/Homebrew/brew/tarball/master# anywhere you like.if [[ -z "${HOMEBREW_ON_LINUX-}" ]]; then HOMEBREW_PREFIX="/usr/local" HOMEBREW_REPOSITORY="/usr/local/Homebrew" HOMEBREW_CACHE="${HOME}/Library/Caches/Homebrew" STAT="stat -f" CHOWN="/usr/sbin/chown" CHGRP="/usr/bin/chgrp" GROUP="admin" TOUCH="/usr/bin/touch"else HOMEBREW_PREFIX_DEFAULT="/home/linuxbrew/.linuxbrew" HOMEBREW_CACHE="${HOME}/.cache/Homebrew" STAT="stat --printf" CHOWN="/bin/chown" CHGRP="/bin/chgrp" GROUP="$(id -gn)" TOUCH="/bin/touch"fiBREW_REPO="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"# TODO: bump version when new macOS is releasedMACOS_LATEST_SUPPORTED="10.15"# TODO: bump version when new macOS is releasedMACOS_OLDEST_SUPPORTED="10.13"# For Homebrew on LinuxREQUIRED_RUBY_VERSION=2.6 # https://github.com/Homebrew/brew/pull/6556REQUIRED_GLIBC_VERSION=2.13 # https://docs.brew.sh/Homebrew-on-Linux#requirements# no analytics during installationexport HOMEBREW_NO_ANALYTICS_THIS_RUN=1export HOMEBREW_NO_ANALYTICS_MESSAGE_OUTPUT=1# string formattersif [[ -t 1 ]]; then tty_escape() { printf "\033[%sm" "$1"; }else tty_escape() { :; }fitty_mkbold() { tty_escape "1;$1"; }tty_underline="$(tty_escape "4;39")"tty_blue="$(tty_mkbold 34)"tty_red="$(tty_mkbold 31)"tty_bold="$(tty_mkbold 39)"tty_reset="$(tty_escape 0)"have_sudo_access() { local -a args if [[ -n "${SUDO_ASKPASS-}" ]]; then args=("-A") fi if [[ -z "${HAVE_SUDO_ACCESS-}" ]]; then if [[ -n "${args[*]-}" ]]; then /usr/bin/sudo "${args[@]}" -l mkdir &>/dev/null else /usr/bin/sudo -l mkdir &>/dev/null fi HAVE_SUDO_ACCESS="$?" fi if [[ -z "${HOMEBREW_ON_LINUX-}" ]] && [[ "$HAVE_SUDO_ACCESS" -ne 0 ]]; then abort "Need sudo access on macOS (e.g. the user $USER to be an Administrator)!" fi return "$HAVE_SUDO_ACCESS"}shell_join() { local arg printf "%s" "$1" shift for arg in "$@"; do printf " " printf "%s" "${arg// /\ }" done}chomp() { printf "%s" "${1/"$'\n'"/}"}ohai() { printf "${tty_blue}==>${tty_bold} %s${tty_reset}\n" "$(shell_join "$@")"}warn() { printf "${tty_red}Warning${tty_reset}: %s\n" "$(chomp "$1")"}abort() { printf "%s\n" "$1" exit 1}execute() { if ! "$@"; then abort "$(printf "Failed during: %s" "$(shell_join "$@")")" fi}execute_sudo() { local -a args=("$@") if [[ -n "${SUDO_ASKPASS-}" ]]; then args=("-A" "${args[@]}") fi if have_sudo_access; then ohai "/usr/bin/sudo" "${args[@]}" execute "/usr/bin/sudo" "${args[@]}" else ohai "${args[@]}" execute "${args[@]}" fi}getc() { local save_state save_state=$(/bin/stty -g) /bin/stty raw -echo IFS= read -r -n 1 -d '' "$@" /bin/stty "$save_state"}wait_for_user() { local c echo echo "Press RETURN to continue or any other key to abort" getc c # we test for \r and \n because some stuff does \r instead if ! [[ "$c" == $'\r' || "$c" == $'\n' ]]; then exit 1 fi}major_minor() { echo "${1%%.*}.$(x="${1#*.}"; echo "${x%%.*}")"}if [[ -z "${HOMEBREW_ON_LINUX-}" ]]; then macos_version="$(major_minor "$(/usr/bin/sw_vers -productVersion)")"fiversion_gt() { [[ "${1%.*}" -gt "${2%.*}" ]] || [[ "${1%.*}" -eq "${2%.*}" && "${1#*.}" -gt "${2#*.}" ]]}version_ge() { [[ "${1%.*}" -gt "${2%.*}" ]] || [[ "${1%.*}" -eq "${2%.*}" && "${1#*.}" -ge "${2#*.}" ]]}version_lt() { [[ "${1%.*}" -lt "${2%.*}" ]] || [[ "${1%.*}" -eq "${2%.*}" && "${1#*.}" -lt "${2#*.}" ]]}should_install_command_line_tools() { if [[ -n "${HOMEBREW_ON_LINUX-}" ]]; then return 1 fi if version_gt "$macos_version" "10.13"; then ! [[ -e "/Library/Developer/CommandLineTools/usr/bin/git" ]] else ! [[ -e "/Library/Developer/CommandLineTools/usr/bin/git" ]] || ! [[ -e "/usr/include/iconv.h" ]] fi}get_permission() { $STAT "%A" "$1"}user_only_chmod() { [[ -d "$1" ]] && [[ "$(get_permission "$1")" != "755" ]]}exists_but_not_writable() { [[ -e "$1" ]] && ! [[ -r "$1" && -w "$1" && -x "$1" ]]}get_owner() { $STAT "%u" "$1"}file_not_owned() { [[ "$(get_owner "$1")" != "$(id -u)" ]]}get_group() { $STAT "%g" "$1"}file_not_grpowned() { [[ " $(id -G "$USER") " != *" $(get_group "$1") "* ]]}# Please sync with 'test_ruby()' in 'Library/Homebrew/utils/ruby.sh' from Homebrew/brew repository.test_ruby () { if [[ ! -x $1 ]] then return 1 fi "$1" --enable-frozen-string-literal --disable=gems,did_you_mean,rubyopt -rrubygems -e \ "abort if Gem::Version.new(RUBY_VERSION.to_s.dup).to_s.split('.').first(2) != \ Gem::Version.new('$REQUIRED_RUBY_VERSION').to_s.split('.').first(2)" 2>/dev/null}no_usable_ruby() { local ruby_exec IFS=$'\n' # Do word splitting on new lines only for ruby_exec in $(which -a ruby); do if test_ruby "$ruby_exec"; then return 1 fi done IFS=$' \t\n' # Restore IFS to its default value return 0}outdated_glibc() { local glibc_version glibc_version=$(ldd --version | head -n1 | grep -o '[0-9.]*$' | grep -o '^[0-9]\+\.[0-9]\+') version_lt "$glibc_version" "$REQUIRED_GLIBC_VERSION"}if [[ -n "${HOMEBREW_ON_LINUX-}" ]] && no_usable_ruby && outdated_glibcthen abort "$(cat <<-EOFABORT Homebrew requires Ruby $REQUIRED_RUBY_VERSION which was not found on your system. Homebrew portable Ruby requires Glibc version $REQUIRED_GLIBC_VERSION or newer, and your Glibc version is too old. See ${tty_underline}https://docs.brew.sh/Homebrew-on-Linux#requirements${tty_reset} Install Ruby $REQUIRED_RUBY_VERSION and add its location to your PATH. EOFABORT )"fi# USER isn't always set so provide a fall back for the installer and subprocesses.if [[ -z "${USER-}" ]]; then USER="$(chomp "$(id -un)")" export USERfi# Invalidate sudo timestamp before exiting (if it wasn't active before).if ! /usr/bin/sudo -n -v 2>/dev/null; then trap '/usr/bin/sudo -k' EXITfi# Things can fail later if `pwd` doesn't exist.# Also sudo prints a warning message for no good reasoncd "/usr" || exit 1####################################################################### scriptif ! command -v git >/dev/null; then abort "$(cat <<EOABORTYou must install Git before installing Homebrew. See: ${tty_underline}https://docs.brew.sh/Installation${tty_reset}EOABORT)"fiif ! command -v curl >/dev/null; then abort "$(cat <<EOABORTYou must install cURL before installing Homebrew. See: ${tty_underline}https://docs.brew.sh/Installation${tty_reset}EOABORT)"fiif [[ -z "${HOMEBREW_ON_LINUX-}" ]]; then have_sudo_accesselse if [[ -n "${CI-}" ]] || [[ -w "$HOMEBREW_PREFIX_DEFAULT" ]] || [[ -w "/home/linuxbrew" ]] || [[ -w "/home" ]]; then HOMEBREW_PREFIX="$HOMEBREW_PREFIX_DEFAULT" else trap exit SIGINT if [[ $(/usr/bin/sudo -n -l mkdir 2>&1) != *"mkdir"* ]]; then ohai "Select the Homebrew installation directory" echo "- ${tty_bold}Enter your password${tty_reset} to install to ${tty_underline}${HOMEBREW_PREFIX_DEFAULT}${tty_reset} (${tty_bold}recommended${tty_reset})" echo "- ${tty_bold}Press Control-D${tty_reset} to install to ${tty_underline}$HOME/.linuxbrew${tty_reset}" echo "- ${tty_bold}Press Control-C${tty_reset} to cancel installation" fi if have_sudo_access; then HOMEBREW_PREFIX="$HOMEBREW_PREFIX_DEFAULT" else HOMEBREW_PREFIX="$HOME/.linuxbrew" fi trap - SIGINT fi HOMEBREW_REPOSITORY="${HOMEBREW_PREFIX}/Homebrew"fiif [[ "$UID" == "0" ]]; then abort "Don't run this as root!"elif [[ -d "$HOMEBREW_PREFIX" && ! -x "$HOMEBREW_PREFIX" ]]; then abort "$(cat <<EOABORTThe Homebrew prefix, ${HOMEBREW_PREFIX}, exists but is not searchable. If this isnot intentional, please restore the default permissions and try running theinstaller again: sudo chmod 775 ${HOMEBREW_PREFIX}EOABORT)"fiif [[ -z "${HOMEBREW_ON_LINUX-}" ]]; then if version_lt "$macos_version" "10.7"; then abort "$(cat <<EOABORTYour Mac OS X version is too old. See: ${tty_underline}https://github.com/mistydemeo/tigerbrew${tty_reset}EOABORT)" elif version_lt "$macos_version" "10.10"; then abort "Your OS X version is too old" elif version_gt "$macos_version" "$MACOS_LATEST_SUPPORTED" || \ version_lt "$macos_version" "$MACOS_OLDEST_SUPPORTED"; then who="We" what="" if version_gt "$macos_version" "$MACOS_LATEST_SUPPORTED"; then what="pre-release version" else who+=" (and Apple)" what="old version" fi ohai "You are using macOS ${macos_version}." ohai "${who} do not provide support for this ${what}." echo "$(cat <<EOSThis installation may not succeed.After installation, you will encounter build failures with some formulae.Please create pull requests instead of asking for help on Homebrew\'s GitHub,Discourse, Twitter or IRC. You are responsible for resolving any issues youexperience while you are running this ${what}.EOS)" fifiohai "This script will install:"echo "${HOMEBREW_PREFIX}/bin/brew"echo "${HOMEBREW_PREFIX}/share/doc/homebrew"echo "${HOMEBREW_PREFIX}/share/man/man1/brew.1"echo "${HOMEBREW_PREFIX}/share/zsh/site-functions/_brew"echo "${HOMEBREW_PREFIX}/etc/bash_completion.d/brew"echo "${HOMEBREW_REPOSITORY}"# Keep relatively in sync with# https://github.com/Homebrew/brew/blob/master/Library/Homebrew/keg.rbdirectories=(bin etc include lib sbin share opt var Frameworks etc/bash_completion.d lib/pkgconfig share/aclocal share/doc share/info share/locale share/man share/man/man1 share/man/man2 share/man/man3 share/man/man4 share/man/man5 share/man/man6 share/man/man7 share/man/man8 var/log var/homebrew var/homebrew/linked bin/brew)group_chmods=()for dir in "${directories[@]}"; do if exists_but_not_writable "${HOMEBREW_PREFIX}/${dir}"; then group_chmods+=("${HOMEBREW_PREFIX}/${dir}") fidone# zsh refuses to read from these directories if group writabledirectories=(share/zsh share/zsh/site-functions)zsh_dirs=()for dir in "${directories[@]}"; do zsh_dirs+=("${HOMEBREW_PREFIX}/${dir}")donedirectories=(bin etc include lib sbin share var opt share/zsh share/zsh/site-functions var/homebrew var/homebrew/linked Cellar Caskroom Homebrew Frameworks)mkdirs=()for dir in "${directories[@]}"; do if ! [[ -d "${HOMEBREW_PREFIX}/${dir}" ]]; then mkdirs+=("${HOMEBREW_PREFIX}/${dir}") fidoneuser_chmods=()if [[ "${#zsh_dirs[@]}" -gt 0 ]]; then for dir in "${zsh_dirs[@]}"; do if user_only_chmod "${dir}"; then user_chmods+=("${dir}") fi donefichmods=()if [[ "${#group_chmods[@]}" -gt 0 ]]; then chmods+=("${group_chmods[@]}")fiif [[ "${#user_chmods[@]}" -gt 0 ]]; then chmods+=("${user_chmods[@]}")fichowns=()chgrps=()if [[ "${#chmods[@]}" -gt 0 ]]; then for dir in "${chmods[@]}"; do if file_not_owned "${dir}"; then chowns+=("${dir}") fi if file_not_grpowned "${dir}"; then chgrps+=("${dir}") fi donefiif [[ "${#group_chmods[@]}" -gt 0 ]]; then ohai "The following existing directories will be made group writable:" printf "%s\n" "${group_chmods[@]}"fiif [[ "${#user_chmods[@]}" -gt 0 ]]; then ohai "The following existing directories will be made writable by user only:" printf "%s\n" "${user_chmods[@]}"fiif [[ "${#chowns[@]}" -gt 0 ]]; then ohai "The following existing directories will have their owner set to ${tty_underline}${USER}${tty_reset}:" printf "%s\n" "${chowns[@]}"fiif [[ "${#chgrps[@]}" -gt 0 ]]; then ohai "The following existing directories will have their group set to ${tty_underline}${GROUP}${tty_reset}:" printf "%s\n" "${chgrps[@]}"fiif [[ "${#mkdirs[@]}" -gt 0 ]]; then ohai "The following new directories will be created:" printf "%s\n" "${mkdirs[@]}"fiif should_install_command_line_tools; then ohai "The Xcode Command Line Tools will be installed."fiif [[ -t 0 && -z "${CI-}" ]]; then wait_for_userfiif [[ -d "${HOMEBREW_PREFIX}" ]]; then if [[ "${#chmods[@]}" -gt 0 ]]; then execute_sudo "/bin/chmod" "u+rwx" "${chmods[@]}" fi if [[ "${#group_chmods[@]}" -gt 0 ]]; then execute_sudo "/bin/chmod" "g+rwx" "${group_chmods[@]}" fi if [[ "${#user_chmods[@]}" -gt 0 ]]; then execute_sudo "/bin/chmod" "755" "${user_chmods[@]}" fi if [[ "${#chowns[@]}" -gt 0 ]]; then execute_sudo "$CHOWN" "$USER" "${chowns[@]}" fi if [[ "${#chgrps[@]}" -gt 0 ]]; then execute_sudo "$CHGRP" "$GROUP" "${chgrps[@]}" fielse execute_sudo "/bin/mkdir" "-p" "${HOMEBREW_PREFIX}" if [[ -z "${HOMEBREW_ON_LINUX-}" ]]; then execute_sudo "$CHOWN" "root:wheel" "${HOMEBREW_PREFIX}" else execute_sudo "$CHOWN" "$USER:$GROUP" "${HOMEBREW_PREFIX}" fifiif [[ "${#mkdirs[@]}" -gt 0 ]]; then execute_sudo "/bin/mkdir" "-p" "${mkdirs[@]}" execute_sudo "/bin/chmod" "g+rwx" "${mkdirs[@]}" execute_sudo "$CHOWN" "$USER" "${mkdirs[@]}" execute_sudo "$CHGRP" "$GROUP" "${mkdirs[@]}"fiif ! [[ -d "${HOMEBREW_CACHE}" ]]; then if [[ -z "${HOMEBREW_ON_LINUX-}" ]]; then execute_sudo "/bin/mkdir" "-p" "${HOMEBREW_CACHE}" else execute "/bin/mkdir" "-p" "${HOMEBREW_CACHE}" fifiif exists_but_not_writable "${HOMEBREW_CACHE}"; then execute_sudo "/bin/chmod" "g+rwx" "${HOMEBREW_CACHE}"fiif file_not_owned "${HOMEBREW_CACHE}"; then execute_sudo "$CHOWN" "$USER" "${HOMEBREW_CACHE}"fiif file_not_grpowned "${HOMEBREW_CACHE}"; then execute_sudo "$CHGRP" "$GROUP" "${HOMEBREW_CACHE}"fiif [[ -d "${HOMEBREW_CACHE}" ]]; then execute "$TOUCH" "${HOMEBREW_CACHE}/.cleaned"fiif should_install_command_line_tools && version_ge "$macos_version" "10.13"; then ohai "Searching online for the Command Line Tools" # This temporary file prompts the 'softwareupdate' utility to list the Command Line Tools clt_placeholder="/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress" execute_sudo "$TOUCH" "$clt_placeholder" clt_label_command="/usr/sbin/softwareupdate -l | grep -B 1 -E 'Command Line Tools' | awk -F'*' '/^ *\\*/ {print \$2}' | sed -e 's/^ *Label: //' -e 's/^ *//' | sort -V | tail -n1" clt_label="$(chomp "$(/bin/bash -c "$clt_label_command")")" if [[ -n "$clt_label" ]]; then ohai "Installing $clt_label" execute_sudo "/usr/sbin/softwareupdate" "-i" "$clt_label" execute_sudo "/bin/rm" "-f" "$clt_placeholder" execute_sudo "/usr/bin/xcode-select" "--switch" "/Library/Developer/CommandLineTools" fifi# Headless install may have failed, so fallback to original 'xcode-select' methodif should_install_command_line_tools && test -t 0; then ohai "Installing the Command Line Tools (expect a GUI popup):" execute_sudo "/usr/bin/xcode-select" "--install" echo "Press any key when the installation has completed." getc execute_sudo "/usr/bin/xcode-select" "--switch" "/Library/Developer/CommandLineTools"fiif [[ -z "${HOMEBREW_ON_LINUX-}" ]] && ! output="$(/usr/bin/xcrun clang 2>&1)" && [[ "$output" == *"license"* ]]; then abort "$(cat <<EOABORTYou have not agreed to the Xcode license.Before running the installer again please agree to the license by openingXcode.app or running: sudo xcodebuild -licenseEOABORT)"fiohai "Downloading and installing Homebrew..."( cd "${HOMEBREW_REPOSITORY}" >/dev/null || return # we do it in four steps to avoid merge errors when reinstalling execute "git" "init" "-q" # "git remote add" will fail if the remote is defined in the global config execute "git" "config" "remote.origin.url" "${BREW_REPO}" execute "git" "config" "remote.origin.fetch" "+refs/heads/*:refs/remotes/origin/*" # ensure we don't munge line endings on checkout execute "git" "config" "core.autocrlf" "false" execute "git" "fetch" "origin" "--force" execute "git" "fetch" "origin" "--tags" "--force" execute "git" "reset" "--hard" "origin/master" execute "ln" "-sf" "${HOMEBREW_REPOSITORY}/bin/brew" "${HOMEBREW_PREFIX}/bin/brew" execute "${HOMEBREW_PREFIX}/bin/brew" "update" "--force") || exit 1if [[ ":${PATH}:" != *":${HOMEBREW_PREFIX}/bin:"* ]]; then warn "${HOMEBREW_PREFIX}/bin is not in your PATH."fiohai "Installation successful!"echo# Use the shell's audible bell.if [[ -t 1 ]]; then printf "\a"fi# Use an extra newline and bold to avoid this being missed.ohai "Homebrew has enabled anonymous aggregate formulae and cask analytics."echo "$(cat <<EOS${tty_bold}Read the analytics documentation (and how to opt-out) here: ${tty_underline}https://docs.brew.sh/Analytics${tty_reset}No analytics data has been sent yet (or will be during this \`install\` run).EOS)"ohai "Homebrew is run entirely by unpaid volunteers. Please consider donating:"echo "$(cat <<EOS ${tty_underline}https://github.com/Homebrew/brew#donations${tty_reset}EOS)"( cd "${HOMEBREW_REPOSITORY}" >/dev/null || return execute "git" "config" "--replace-all" "homebrew.analyticsmessage" "true" execute "git" "config" "--replace-all" "homebrew.caskanalyticsmessage" "true") || exit 1ohai "Next steps:"echo "- Run \`brew help\` to get started"echo "- Further documentation: "echo " ${tty_underline}https://docs.brew.sh${tty_reset}"if [[ -n "${HOMEBREW_ON_LINUX-}" ]]; then case "$SHELL" in */bash*) if [[ -r "$HOME/.bash_profile" ]]; then shell_profile="$HOME/.bash_profile" else shell_profile="$HOME/.profile" fi ;; */zsh*) shell_profile="$HOME/.zprofile" ;; *) shell_profile="$HOME/.profile" ;; esac echo "- Install the Homebrew dependencies if you have sudo access:" if [[ $(command -v apt-get) ]]; then echo " sudo apt-get install build-essential" elif [[ $(command -v yum) ]]; then echo " sudo yum groupinstall 'Development Tools'" elif [[ $(command -v pacman) ]]; then echo " sudo pacman -S base-devel" elif [[ $(command -v apk) ]]; then echo " sudo apk add build-base" fi cat <<EOS See ${tty_underline}https://docs.brew.sh/linux${tty_reset} for more information- Add Homebrew to your ${tty_bold}PATH${tty_reset} in ${tty_underline}${shell_profile}${tty_reset}: echo 'eval \$(${HOMEBREW_PREFIX}/bin/brew shellenv)' >> ${shell_profile} eval \$(${HOMEBREW_PREFIX}/bin/brew shellenv)- We recommend that you install GCC: brew install gccEOSfi

3.終端運(yùn)行brew_install文件

直接拖進(jìn)去運(yùn)行(如果出現(xiàn)define permission 柴我,?sudo chmod?-R 777 根路徑提高權(quán)限)

4、檢測(cè)安裝

brew

1.下載python3.7

https://www.python.org/downloads/mac-osx/

2扩然、傻瓜式安裝

PS艘儒、 Mac自帶Python,有些軟件的運(yùn)行可能需要用到2.X的版本夫偶,而3的版本與2的版本區(qū)別甚大界睁,作為python 開發(fā)還是需要安裝最新的3.x版本

自帶python launcher(python版本轉(zhuǎn)換器?Python launcher根據(jù)文件頭自動(dòng)幫我們調(diào)用了指定版本的解釋器來執(zhí)行該文件。)

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末兵拢,一起剝皮案震驚了整個(gè)濱河市翻斟,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌说铃,老刑警劉巖访惜,帶你破解...
    沈念sama閱讀 211,194評(píng)論 6 490
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件嘹履,死亡現(xiàn)場(chǎng)離奇詭異,居然都是意外死亡债热,警方通過查閱死者的電腦和手機(jī)砾嫉,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,058評(píng)論 2 385
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來窒篱,“玉大人焕刮,你說我怎么就攤上這事∏奖” “怎么了配并?”我有些...
    開封第一講書人閱讀 156,780評(píng)論 0 346
  • 文/不壞的土叔 我叫張陵,是天一觀的道長(zhǎng)高镐。 經(jīng)常有香客問我溉旋,道長(zhǎng),這世上最難降的妖魔是什么嫉髓? 我笑而不...
    開封第一講書人閱讀 56,388評(píng)論 1 283
  • 正文 為了忘掉前任低滩,我火速辦了婚禮,結(jié)果婚禮上岩喷,老公的妹妹穿的比我還像新娘。我一直安慰自己监憎,他們只是感情好纱意,可當(dāng)我...
    茶點(diǎn)故事閱讀 65,430評(píng)論 5 384
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著鲸阔,像睡著了一般偷霉。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上褐筛,一...
    開封第一講書人閱讀 49,764評(píng)論 1 290
  • 那天类少,我揣著相機(jī)與錄音,去河邊找鬼渔扎。 笑死硫狞,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的晃痴。 我是一名探鬼主播残吩,決...
    沈念sama閱讀 38,907評(píng)論 3 406
  • 文/蒼蘭香墨 我猛地睜開眼,長(zhǎng)吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼倘核!你這毒婦竟也來了泣侮?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 37,679評(píng)論 0 266
  • 序言:老撾萬榮一對(duì)情侶失蹤紧唱,失蹤者是張志新(化名)和其女友劉穎活尊,沒想到半個(gè)月后隶校,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 44,122評(píng)論 1 303
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡蛹锰,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 36,459評(píng)論 2 325
  • 正文 我和宋清朗相戀三年深胳,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片宁仔。...
    茶點(diǎn)故事閱讀 38,605評(píng)論 1 340
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡稠屠,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出翎苫,到底是詐尸還是另有隱情权埠,我是刑警寧澤,帶...
    沈念sama閱讀 34,270評(píng)論 4 329
  • 正文 年R本政府宣布煎谍,位于F島的核電站攘蔽,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏呐粘。R本人自食惡果不足惜满俗,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,867評(píng)論 3 312
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望作岖。 院中可真熱鬧唆垃,春花似錦、人聲如沸痘儡。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,734評(píng)論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽沉删。三九已至渐尿,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間矾瑰,已是汗流浹背砖茸。 一陣腳步聲響...
    開封第一講書人閱讀 31,961評(píng)論 1 265
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留殴穴,地道東北人凉夯。 一個(gè)月前我還...
    沈念sama閱讀 46,297評(píng)論 2 360
  • 正文 我出身青樓,卻偏偏與公主長(zhǎng)得像采幌,于是被迫代替她去往敵國和親恍涂。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 43,472評(píng)論 2 348