投稿コード一覧
https://qiita.com/Qiita/items/c686397e4a0f4f11683d
cd /Users/ユーザー名/Projects
Homebrewをインストール
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> Checking for `sudo` access (which may request your password)...
Password:
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following new directories will be created:
/usr/local/bin
/usr/local/etc
/usr/local/include
/usr/local/lib
/usr/local/sbin
/usr/local/share
/usr/local/var
/usr/local/opt
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
/usr/local/var/homebrew
/usr/local/var/homebrew/linked
/usr/local/Cellar
/usr/local/Caskroom
/usr/local/Frameworks
==> The Xcode Command Line Tools will be installed.
Press RETURN to continue or any other key to abort:
==> /usr/bin/sudo /bin/mkdir -p /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/share /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Frameworks
==> /usr/bin/sudo /bin/chmod ug=rwx /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/share /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Frameworks
==> /usr/bin/sudo /bin/chmod go-w /usr/local/share/zsh /usr/local/share/zsh/site-functions
==> /usr/bin/sudo /usr/sbin/chown ユーザー名 /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/share /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Frameworks
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/share /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Frameworks
==> /usr/bin/sudo /bin/mkdir -p /usr/local/Homebrew
==> /usr/bin/sudo /usr/sbin/chown -R ユーザー名:admin /usr/local/Homebrew
==> /usr/bin/sudo /bin/mkdir -p /Users/ユーザー名/Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Users/ユーザー名/Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown -R ユーザー名 /Users/ユーザー名/Library/Caches/Homebrew
==> Searching online for the Command Line Tools
==> /usr/bin/sudo /usr/bin/touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
==> Installing Command Line Tools for Xcode-13.2
==> /usr/bin/sudo /usr/sbin/softwareupdate -i Command\ Line\ Tools\ for\ Xcode-13.2
Software Update Tool
Finding available software
Downloading Command Line Tools for Xcode
Downloaded Command Line Tools for Xcode
Installing Command Line Tools for Xcode
Done with Command Line Tools for Xcode
Done.
==> /usr/bin/sudo /bin/rm -f /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
Password:
Done with Command Line Tools for Xcode
Done.
==> /usr/bin/sudo /bin/rm -f /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
Password:
Sorry, try again.
Password:
==> /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools
==> Downloading and installing Homebrew...
remote: Enumerating objects: 199407, done.
remote: Counting objects: 100% (259/259), done.
remote: Compressing objects: 100% (171/171), done.
remote: Total 199407 (delta 89), reused 210 (delta 74), pack-reused 199148
Receiving objects: 100% (199407/199407), 54.60 MiB | 10.83 MiB/s, done.
Resolving deltas: 100% (147326/147326), done.
From https://github.com/Homebrew/brew
* [new branch] fxcoudert-patch-1 -> origin/fxcoudert-patch-1
* [new branch] master -> origin/master
* [new tag] 0.1 -> 0.1
* [new tag] 0.2 -> 0.2
* [new tag] 0.3 -> 0.3
* [new tag] 0.4 -> 0.4
* [new tag] 0.5 -> 0.5
* [new tag] 0.6 -> 0.6
* [new tag] 0.7 -> 0.7
* [new tag] 0.7.1 -> 0.7.1
* [new tag] 0.8 -> 0.8
* [new tag] 0.8.1 -> 0.8.1
* [new tag] 0.9 -> 0.9
* [new tag] 0.9.1 -> 0.9.1
* [new tag] 0.9.2 -> 0.9.2
* [new tag] 0.9.3 -> 0.9.3
* [new tag] 0.9.4 -> 0.9.4
* [new tag] 0.9.5 -> 0.9.5
* [new tag] 0.9.8 -> 0.9.8
* [new tag] 0.9.9 -> 0.9.9
* [new tag] 1.0.0 -> 1.0.0
* [new tag] 1.0.1 -> 1.0.1
* [new tag] 1.0.2 -> 1.0.2
* [new tag] 1.0.3 -> 1.0.3
* [new tag] 1.0.4 -> 1.0.4
* [new tag] 1.0.5 -> 1.0.5
* [new tag] 1.0.6 -> 1.0.6
* [new tag] 1.0.7 -> 1.0.7
* [new tag] 1.0.8 -> 1.0.8
* [new tag] 1.0.9 -> 1.0.9
* [new tag] 1.1.0 -> 1.1.0
* [new tag] 1.1.1 -> 1.1.1
* [new tag] 1.1.10 -> 1.1.10
* [new tag] 1.1.11 -> 1.1.11
* [new tag] 1.1.12 -> 1.1.12
* [new tag] 1.1.13 -> 1.1.13
* [new tag] 1.1.2 -> 1.1.2
* [new tag] 1.1.3 -> 1.1.3
* [new tag] 1.1.4 -> 1.1.4
* [new tag] 1.1.5 -> 1.1.5
* [new tag] 1.1.6 -> 1.1.6
* [new tag] 1.1.7 -> 1.1.7
* [new tag] 1.1.8 -> 1.1.8
* [new tag] 1.1.9 -> 1.1.9
* [new tag] 1.2.0 -> 1.2.0
* [new tag] 1.2.1 -> 1.2.1
* [new tag] 1.2.2 -> 1.2.2
* [new tag] 1.2.3 -> 1.2.3
* [new tag] 1.2.4 -> 1.2.4
* [new tag] 1.2.5 -> 1.2.5
* [new tag] 1.2.6 -> 1.2.6
* [new tag] 1.3.0 -> 1.3.0
* [new tag] 1.3.1 -> 1.3.1
* [new tag] 1.3.2 -> 1.3.2
* [new tag] 1.3.3 -> 1.3.3
* [new tag] 1.3.4 -> 1.3.4
* [new tag] 1.3.5 -> 1.3.5
* [new tag] 1.3.6 -> 1.3.6
* [new tag] 1.3.7 -> 1.3.7
* [new tag] 1.3.8 -> 1.3.8
* [new tag] 1.3.9 -> 1.3.9
* [new tag] 1.4.0 -> 1.4.0
* [new tag] 1.4.1 -> 1.4.1
* [new tag] 1.4.2 -> 1.4.2
* [new tag] 1.4.3 -> 1.4.3
* [new tag] 1.5.0 -> 1.5.0
* [new tag] 1.5.1 -> 1.5.1
* [new tag] 1.5.10 -> 1.5.10
* [new tag] 1.5.11 -> 1.5.11
* [new tag] 1.5.12 -> 1.5.12
* [new tag] 1.5.13 -> 1.5.13
* [new tag] 1.5.14 -> 1.5.14
* [new tag] 1.5.2 -> 1.5.2
* [new tag] 1.5.3 -> 1.5.3
* [new tag] 1.5.4 -> 1.5.4
* [new tag] 1.5.5 -> 1.5.5
* [new tag] 1.5.6 -> 1.5.6
* [new tag] 1.5.7 -> 1.5.7
* [new tag] 1.5.8 -> 1.5.8
* [new tag] 1.5.9 -> 1.5.9
* [new tag] 1.6.0 -> 1.6.0
* [new tag] 1.6.1 -> 1.6.1
* [new tag] 1.6.10 -> 1.6.10
* [new tag] 1.6.11 -> 1.6.11
* [new tag] 1.6.12 -> 1.6.12
* [new tag] 1.6.13 -> 1.6.13
* [new tag] 1.6.14 -> 1.6.14
* [new tag] 1.6.15 -> 1.6.15
* [new tag] 1.6.16 -> 1.6.16
* [new tag] 1.6.17 -> 1.6.17
* [new tag] 1.6.2 -> 1.6.2
* [new tag] 1.6.3 -> 1.6.3
* [new tag] 1.6.4 -> 1.6.4
* [new tag] 1.6.5 -> 1.6.5
* [new tag] 1.6.6 -> 1.6.6
* [new tag] 1.6.7 -> 1.6.7
* [new tag] 1.6.8 -> 1.6.8
* [new tag] 1.6.9 -> 1.6.9
* [new tag] 1.7.0 -> 1.7.0
* [new tag] 1.7.1 -> 1.7.1
* [new tag] 1.7.2 -> 1.7.2
* [new tag] 1.7.3 -> 1.7.3
* [new tag] 1.7.4 -> 1.7.4
* [new tag] 1.7.5 -> 1.7.5
* [new tag] 1.7.6 -> 1.7.6
* [new tag] 1.7.7 -> 1.7.7
* [new tag] 1.8.0 -> 1.8.0
* [new tag] 1.8.1 -> 1.8.1
* [new tag] 1.8.2 -> 1.8.2
* [new tag] 1.8.3 -> 1.8.3
* [new tag] 1.8.4 -> 1.8.4
* [new tag] 1.8.5 -> 1.8.5
* [new tag] 1.8.6 -> 1.8.6
* [new tag] 1.9.0 -> 1.9.0
* [new tag] 1.9.1 -> 1.9.1
* [new tag] 1.9.2 -> 1.9.2
* [new tag] 1.9.3 -> 1.9.3
* [new tag] 2.0.0 -> 2.0.0
* [new tag] 2.0.1 -> 2.0.1
* [new tag] 2.0.2 -> 2.0.2
* [new tag] 2.0.3 -> 2.0.3
* [new tag] 2.0.4 -> 2.0.4
* [new tag] 2.0.5 -> 2.0.5
* [new tag] 2.0.6 -> 2.0.6
* [new tag] 2.1.0 -> 2.1.0
* [new tag] 2.1.1 -> 2.1.1
* [new tag] 2.1.10 -> 2.1.10
* [new tag] 2.1.11 -> 2.1.11
* [new tag] 2.1.12 -> 2.1.12
* [new tag] 2.1.13 -> 2.1.13
* [new tag] 2.1.14 -> 2.1.14
* [new tag] 2.1.15 -> 2.1.15
* [new tag] 2.1.16 -> 2.1.16
* [new tag] 2.1.2 -> 2.1.2
* [new tag] 2.1.3 -> 2.1.3
* [new tag] 2.1.4 -> 2.1.4
* [new tag] 2.1.5 -> 2.1.5
* [new tag] 2.1.6 -> 2.1.6
* [new tag] 2.1.7 -> 2.1.7
* [new tag] 2.1.8 -> 2.1.8
* [new tag] 2.1.9 -> 2.1.9
* [new tag] 2.2.0 -> 2.2.0
* [new tag] 2.2.1 -> 2.2.1
* [new tag] 2.2.10 -> 2.2.10
* [new tag] 2.2.11 -> 2.2.11
* [new tag] 2.2.12 -> 2.2.12
* [new tag] 2.2.13 -> 2.2.13
* [new tag] 2.2.14 -> 2.2.14
* [new tag] 2.2.15 -> 2.2.15
* [new tag] 2.2.16 -> 2.2.16
* [new tag] 2.2.17 -> 2.2.17
* [new tag] 2.2.2 -> 2.2.2
* [new tag] 2.2.3 -> 2.2.3
* [new tag] 2.2.4 -> 2.2.4
* [new tag] 2.2.5 -> 2.2.5
* [new tag] 2.2.6 -> 2.2.6
* [new tag] 2.2.7 -> 2.2.7
* [new tag] 2.2.8 -> 2.2.8
* [new tag] 2.2.9 -> 2.2.9
* [new tag] 2.3.0 -> 2.3.0
* [new tag] 2.4.0 -> 2.4.0
* [new tag] 2.4.1 -> 2.4.1
* [new tag] 2.4.10 -> 2.4.10
* [new tag] 2.4.11 -> 2.4.11
* [new tag] 2.4.12 -> 2.4.12
* [new tag] 2.4.13 -> 2.4.13
* [new tag] 2.4.14 -> 2.4.14
* [new tag] 2.4.15 -> 2.4.15
* [new tag] 2.4.16 -> 2.4.16
* [new tag] 2.4.2 -> 2.4.2
* [new tag] 2.4.3 -> 2.4.3
* [new tag] 2.4.4 -> 2.4.4
* [new tag] 2.4.5 -> 2.4.5
* [new tag] 2.4.6 -> 2.4.6
* [new tag] 2.4.7 -> 2.4.7
* [new tag] 2.4.8 -> 2.4.8
* [new tag] 2.4.9 -> 2.4.9
* [new tag] 2.5.0 -> 2.5.0
* [new tag] 2.5.1 -> 2.5.1
* [new tag] 2.5.10 -> 2.5.10
* [new tag] 2.5.11 -> 2.5.11
* [new tag] 2.5.12 -> 2.5.12
* [new tag] 2.5.2 -> 2.5.2
* [new tag] 2.5.3 -> 2.5.3
* [new tag] 2.5.4 -> 2.5.4
* [new tag] 2.5.5 -> 2.5.5
* [new tag] 2.5.6 -> 2.5.6
* [new tag] 2.5.7 -> 2.5.7
* [new tag] 2.5.8 -> 2.5.8
* [new tag] 2.5.9 -> 2.5.9
* [new tag] 2.6.0 -> 2.6.0
* [new tag] 2.6.1 -> 2.6.1
* [new tag] 2.6.2 -> 2.6.2
* [new tag] 2.7.0 -> 2.7.0
* [new tag] 2.7.1 -> 2.7.1
* [new tag] 2.7.2 -> 2.7.2
* [new tag] 2.7.3 -> 2.7.3
* [new tag] 2.7.4 -> 2.7.4
* [new tag] 2.7.5 -> 2.7.5
* [new tag] 2.7.6 -> 2.7.6
* [new tag] 2.7.7 -> 2.7.7
* [new tag] 3.0.0 -> 3.0.0
* [new tag] 3.0.1 -> 3.0.1
* [new tag] 3.0.10 -> 3.0.10
* [new tag] 3.0.11 -> 3.0.11
* [new tag] 3.0.2 -> 3.0.2
* [new tag] 3.0.3 -> 3.0.3
* [new tag] 3.0.4 -> 3.0.4
* [new tag] 3.0.5 -> 3.0.5
* [new tag] 3.0.6 -> 3.0.6
* [new tag] 3.0.7 -> 3.0.7
* [new tag] 3.0.8 -> 3.0.8
* [new tag] 3.0.9 -> 3.0.9
* [new tag] 3.1.0 -> 3.1.0
* [new tag] 3.1.1 -> 3.1.1
* [new tag] 3.1.10 -> 3.1.10
* [new tag] 3.1.11 -> 3.1.11
* [new tag] 3.1.12 -> 3.1.12
* [new tag] 3.1.2 -> 3.1.2
* [new tag] 3.1.3 -> 3.1.3
* [new tag] 3.1.4 -> 3.1.4
* [new tag] 3.1.5 -> 3.1.5
* [new tag] 3.1.6 -> 3.1.6
* [new tag] 3.1.7 -> 3.1.7
* [new tag] 3.1.8 -> 3.1.8
* [new tag] 3.1.9 -> 3.1.9
* [new tag] 3.2.0 -> 3.2.0
* [new tag] 3.2.1 -> 3.2.1
* [new tag] 3.2.10 -> 3.2.10
* [new tag] 3.2.11 -> 3.2.11
* [new tag] 3.2.12 -> 3.2.12
* [new tag] 3.2.13 -> 3.2.13
* [new tag] 3.2.14 -> 3.2.14
* [new tag] 3.2.15 -> 3.2.15
* [new tag] 3.2.16 -> 3.2.16
* [new tag] 3.2.17 -> 3.2.17
* [new tag] 3.2.2 -> 3.2.2
* [new tag] 3.2.3 -> 3.2.3
* [new tag] 3.2.4 -> 3.2.4
* [new tag] 3.2.5 -> 3.2.5
* [new tag] 3.2.6 -> 3.2.6
* [new tag] 3.2.7 -> 3.2.7
* [new tag] 3.2.8 -> 3.2.8
* [new tag] 3.2.9 -> 3.2.9
* [new tag] 3.3.0 -> 3.3.0
* [new tag] 3.3.1 -> 3.3.1
* [new tag] 3.3.2 -> 3.3.2
* [new tag] 3.3.3 -> 3.3.3
* [new tag] 3.3.4 -> 3.3.4
* [new tag] 3.3.5 -> 3.3.5
* [new tag] 3.3.6 -> 3.3.6
* [new tag] 3.3.7 -> 3.3.7
* [new tag] 3.3.8 -> 3.3.8
* [new tag] 3.3.9 -> 3.3.9
HEAD is now at d1a819986 Merge pull request #12620 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-1.24.0
==> Tapping homebrew/core
remote: Enumerating objects: 1118530, done.
remote: Counting objects: 100% (52/52), done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 1118530 (delta 28), reused 45 (delta 22), pack-reused 1118478
Receiving objects: 100% (1118530/1118530), 434.81 MiB | 13.20 MiB/s, done.
Resolving deltas: 100% (772293/772293), done.
From https://github.com/Homebrew/homebrew-core
* [new branch] master -> origin/master
Updating files: 100% (6222/6222), done.
HEAD is now at 2dd943a70c9 parquet-tools: update 1.12.2 bottle.
==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:0cb1cc7af109437fe0e020c9f3b7b95c3c709b140bde9f991ad2c1433496dd42
########################################################################################## 100.0%
==> Pouring portable-ruby-2.6.8.yosemite.bottle.tar.gz
==> Installation successful!
==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics
No analytics data has been sent yet (nor will any be during this install run).
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Next steps:
- Run brew help to get started
- Further documentation:
https://docs.brew.sh
インストールされるか確認
$ brew -v
Homebrew 3.3.9
Homebrew/homebrew-core (git revision 2dd943a70c9; last commit 2021-12-26)
pyenvのインストールされているか確認
$ pyenv -v
bash: pyenv: command not found
$ brew install pyenv
Running `brew update --preinstall`...
==> Downloading https://ghcr.io/v2/homebrew/core/m4/manifests/1.4.19
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/m4/blobs/sha256:b22472f659112cf12163bba770d89161
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:b22472f65911
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/autoconf/manifests/2.71
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/autoconf/blobs/sha256:0aa64f171bac19ce6ac0c0ca69
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:0aa64f171bac
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/manifests/2021-10-26
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/blobs/sha256:1bbd45c16a0b9912174
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:1bbd45c16a0b
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/manifests/1.1.1m
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/blobs/sha256:ad0413d8ee77b50b0a74855
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:ad0413d8ee77
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/pkg-config/manifests/0.29.2_3
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/pkg-config/blobs/sha256:0040b6ebe07f60549800b211
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:0040b6ebe07f
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/readline/manifests/8.1.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/readline/blobs/sha256:c596199dc30f2542144a10f10a
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:c596199dc30f
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/pyenv/manifests/2.2.3
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/pyenv/blobs/sha256:d6a29992e1472574cb5bded1112d5
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:d6a29992e147
######################################################################## 100.0%
==> Installing dependencies for pyenv: m4, autoconf, ca-certificates, openssl@1.1, pkg-config and readline
==> Installing pyenv dependency: m4
==> Pouring m4--1.4.19.big_sur.bottle.tar.gz
🍺 /usr/local/Cellar/m4/1.4.19: 13 files, 724.4KB
==> Installing pyenv dependency: autoconf
==> Pouring autoconf--2.71.big_sur.bottle.tar.gz
🍺 /usr/local/Cellar/autoconf/2.71: 71 files, 3.2MB
==> Installing pyenv dependency: ca-certificates
==> Pouring ca-certificates--2021-10-26.all.bottle.tar.gz
==> Regenerating CA certificate bundle from keychain, this may take a while...
🍺 /usr/local/Cellar/ca-certificates/2021-10-26: 3 files, 208.5KB
==> Installing pyenv dependency: openssl@1.1
==> Pouring openssl@1.1--1.1.1m.big_sur.bottle.tar.gz
🍺 /usr/local/Cellar/openssl@1.1/1.1.1m: 8,081 files, 18.5MB
==> Installing pyenv dependency: pkg-config
==> Pouring pkg-config--0.29.2_3.big_sur.bottle.tar.gz
🍺 /usr/local/Cellar/pkg-config/0.29.2_3: 11 files, 656.8KB
==> Installing pyenv dependency: readline
==> Pouring readline--8.1.1.big_sur.bottle.tar.gz
🍺 /usr/local/Cellar/readline/8.1.1: 48 files, 1.6MB
==> Installing pyenv
==> Pouring pyenv--2.2.3.big_sur.bottle.tar.gz
🍺 /usr/local/Cellar/pyenv/2.2.3: 856 files, 2.8MB
==> Running `brew cleanup pyenv`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
インストール確認
$ pyenv -v
pyenv 2.2.3
pyenvの設定
$ echo $SHELL
/bin/bash
参考
現在使用しているシェルを調べる
https://news.mynavi.jp/techplus/article/20181121-727279/
/bin/bash の場合 以下実行
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
実行結果が /bin/zsh の場合
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
source ~/.zshrc
Pythonのインストール
pyenv install --list
Available versions:
2.1.3
2.2.3
2.3.7
2.4.0
2.4.1
2.4.2
2.4.3
2.4.4
2.4.5
2.4.6
2.5.0
2.5.1
2.5.2
2.5.3
2.5.4
2.5.5
2.5.6
2.6.0
2.6.1
2.6.2
2.6.3
2.6.4
2.6.5
2.6.6
2.6.7
2.6.8
2.6.9
2.7.0
2.7-dev
2.7.1
2.7.2
2.7.3
2.7.4
2.7.5
2.7.6
2.7.7
2.7.8
2.7.9
2.7.10
2.7.11
2.7.12
2.7.13
2.7.14
2.7.15
2.7.16
2.7.17
2.7.18
3.0.1
3.1.0
3.1.1
3.1.2
3.1.3
3.1.4
3.1.5
3.2.0
3.2.1
3.2.2
3.2.3
3.2.4
3.2.5
3.2.6
3.3.0
3.3.1
3.3.2
3.3.3
3.3.4
3.3.5
3.3.6
3.3.7
3.4.0
3.4-dev
3.4.1
3.4.2
3.4.3
3.4.4
3.4.5
3.4.6
3.4.7
3.4.8
3.4.9
3.4.10
3.5.0
3.5-dev
3.5.1
3.5.2
3.5.3
3.5.4
3.5.5
3.5.6
3.5.7
3.5.8
3.5.9
3.5.10
3.6.0
3.6-dev
3.6.1
3.6.2
3.6.3
3.6.4
3.6.5
3.6.6
3.6.7
3.6.8
3.6.9
3.6.10
3.6.11
3.6.12
3.6.13
3.6.14
3.6.15
3.7.0
3.7-dev
3.7.1
3.7.2
3.7.3
3.7.4
3.7.5
3.7.6
3.7.7
3.7.8
3.7.9
3.7.10
3.7.11
3.7.12
3.8.0
3.8-dev
3.8.1
3.8.2
3.8.3
3.8.4
3.8.5
3.8.6
3.8.7
3.8.8
3.8.9
3.8.10
3.8.11
3.8.12
3.9.0
3.9-dev
3.9.1
3.9.2
3.9.4
3.9.5
3.9.6
3.9.7
3.9.8
3.9.9
3.10.0
3.10-dev
3.10.1
3.11.0a3
3.11-dev
activepython-2.7.14
activepython-3.5.4
activepython-3.6.0
anaconda-1.4.0
anaconda-1.5.0
anaconda-1.5.1
anaconda-1.6.0
anaconda-1.6.1
anaconda-1.7.0
anaconda-1.8.0
anaconda-1.9.0
anaconda-1.9.1
anaconda-1.9.2
anaconda-2.0.0
anaconda-2.0.1
anaconda-2.1.0
anaconda-2.2.0
anaconda-2.3.0
anaconda-2.4.0
anaconda-4.0.0
anaconda2-2.4.0
anaconda2-2.4.1
anaconda2-2.5.0
anaconda2-4.0.0
anaconda2-4.1.0
anaconda2-4.1.1
anaconda2-4.2.0
anaconda2-4.3.0
anaconda2-4.3.1
anaconda2-4.4.0
anaconda2-5.0.0
anaconda2-5.0.1
anaconda2-5.1.0
anaconda2-5.2.0
anaconda2-5.3.0
anaconda2-5.3.1
anaconda2-2018.12
anaconda2-2019.03
anaconda2-2019.07
anaconda3-2.0.0
anaconda3-2.0.1
anaconda3-2.1.0
anaconda3-2.2.0
anaconda3-2.3.0
anaconda3-2.4.0
anaconda3-2.4.1
anaconda3-2.5.0
anaconda3-4.0.0
anaconda3-4.1.0
anaconda3-4.1.1
anaconda3-4.2.0
anaconda3-4.3.0
anaconda3-4.3.1
anaconda3-4.4.0
anaconda3-5.0.0
anaconda3-5.0.1
anaconda3-5.1.0
anaconda3-5.2.0
anaconda3-5.3.0
anaconda3-5.3.1
anaconda3-2018.12
anaconda3-2019.03
anaconda3-2019.07
anaconda3-2019.10
anaconda3-2020.02
anaconda3-2020.07
anaconda3-2020.11
anaconda3-2021.05
anaconda3-2021.11
graalpython-20.1.0
graalpython-20.2.0
graalpython-20.3.0
graalpython-21.0.0
graalpython-21.1.0
graalpython-21.2.0
graalpython-21.3.0
ironpython-dev
ironpython-2.7.4
ironpython-2.7.5
ironpython-2.7.6.3
ironpython-2.7.7
jython-dev
jython-2.5.0
jython-2.5-dev
jython-2.5.1
jython-2.5.2
jython-2.5.3
jython-2.5.4-rc1
jython-2.7.0
jython-2.7.1
jython-2.7.2
mambaforge-pypy3
mambaforge
mambaforge-4.10.1-4
mambaforge-4.10.1-5
mambaforge-4.10.3-10
micropython-dev
micropython-1.9.3
micropython-1.9.4
micropython-1.10
micropython-1.11
micropython-1.12
micropython-1.13
micropython-1.14
micropython-1.15
micropython-1.16
micropython-1.17
miniconda-latest
miniconda-2.2.2
miniconda-3.0.0
miniconda-3.0.4
miniconda-3.0.5
miniconda-3.3.0
miniconda-3.4.2
miniconda-3.7.0
miniconda-3.8.3
miniconda-3.9.1
miniconda-3.10.1
miniconda-3.16.0
miniconda-3.18.3
miniconda2-latest
miniconda2-2.7-4.8.3
miniconda2-3.18.3
miniconda2-3.19.0
miniconda2-4.0.5
miniconda2-4.1.11
miniconda2-4.3.14
miniconda2-4.3.21
miniconda2-4.3.27
miniconda2-4.3.30
miniconda2-4.3.31
miniconda2-4.4.10
miniconda2-4.5.1
miniconda2-4.5.4
miniconda2-4.5.11
miniconda2-4.5.12
miniconda2-4.6.14
miniconda2-4.7.10
miniconda2-4.7.12
miniconda3-latest
miniconda3-2.2.2
miniconda3-3.0.0
miniconda3-3.0.4
miniconda3-3.0.5
miniconda3-3.3.0
miniconda3-3.4.2
miniconda3-3.7.0
miniconda3-3.7-4.8.2
miniconda3-3.7-4.8.3
miniconda3-3.7-4.9.2
miniconda3-3.7-4.10.3
miniconda3-3.8.3
miniconda3-3.8-4.8.2
miniconda3-3.8-4.8.3
miniconda3-3.8-4.9.2
miniconda3-3.8-4.10.3
miniconda3-3.9.1
miniconda3-3.9-4.9.2
miniconda3-3.9-4.10.3
miniconda3-3.10.1
miniconda3-3.16.0
miniconda3-3.18.3
miniconda3-3.19.0
miniconda3-4.0.5
miniconda3-4.1.11
miniconda3-4.2.12
miniconda3-4.3.11
miniconda3-4.3.14
miniconda3-4.3.21
miniconda3-4.3.27
miniconda3-4.3.30
miniconda3-4.3.31
miniconda3-4.4.10
miniconda3-4.5.1
miniconda3-4.5.4
miniconda3-4.5.11
miniconda3-4.5.12
miniconda3-4.6.14
miniconda3-4.7.10
miniconda3-4.7.12
miniforge-pypy3
miniforge3
miniforge3-4.9.2
miniforge3-4.10
miniforge3-4.10.1-1
miniforge3-4.10.1-3
miniforge3-4.10.1-5
miniforge3-4.10.3-10
pypy-c-jit-latest
pypy-dev
pypy-stm-2.3
pypy-stm-2.5.1
pypy-1.5-src
pypy-1.6
pypy-1.7
pypy-1.8
pypy-1.9
pypy-2.0-src
pypy-2.0
pypy-2.0.1-src
pypy-2.0.1
pypy-2.0.2-src
pypy-2.0.2
pypy-2.1-src
pypy-2.1
pypy-2.2-src
pypy-2.2
pypy-2.2.1-src
pypy-2.2.1
pypy-2.3-src
pypy-2.3
pypy-2.3.1-src
pypy-2.3.1
pypy-2.4.0-src
pypy-2.4.0
pypy-2.5.0-src
pypy-2.5.0
pypy-2.5.1-src
pypy-2.5.1
pypy-2.6.0-src
pypy-2.6.0
pypy-2.6.1-src
pypy-2.6.1
pypy-4.0.0-src
pypy-4.0.0
pypy-4.0.1-src
pypy-4.0.1
pypy-5.0.0-src
pypy-5.0.0
pypy-5.0.1-src
pypy-5.0.1
pypy-5.1-src
pypy-5.1
pypy-5.1.1-src
pypy-5.1.1
pypy-5.3-src
pypy-5.3
pypy-5.3.1-src
pypy-5.3.1
pypy-5.4-src
pypy-5.4
pypy-5.4.1-src
pypy-5.4.1
pypy-5.6.0-src
pypy-5.6.0
pypy-5.7.0-src
pypy-5.7.0
pypy-5.7.1-src
pypy-5.7.1
pypy2-5.3-src
pypy2-5.3
pypy2-5.3.1-src
pypy2-5.3.1
pypy2-5.4-src
pypy2-5.4
pypy2-5.4.1-src
pypy2-5.4.1
pypy2-5.6.0-src
pypy2-5.6.0
pypy2-5.7.0-src
pypy2-5.7.0
pypy2-5.7.1-src
pypy2-5.7.1
pypy2.7-5.8.0-src
pypy2.7-5.8.0
pypy2.7-5.9.0-src
pypy2.7-5.9.0
pypy2.7-5.10.0-src
pypy2.7-5.10.0
pypy2.7-6.0.0-src
pypy2.7-6.0.0
pypy2.7-7.0.0-src
pypy2.7-7.0.0
pypy2.7-7.1.0-src
pypy2.7-7.1.0
pypy2.7-7.1.1-src
pypy2.7-7.1.1
pypy2.7-7.2.0-src
pypy2.7-7.2.0
pypy2.7-7.3.0-src
pypy2.7-7.3.0
pypy2.7-7.3.1-src
pypy2.7-7.3.1
pypy2.7-7.3.2-src
pypy2.7-7.3.2
pypy2.7-7.3.3-src
pypy2.7-7.3.3
pypy2.7-7.3.4-src
pypy2.7-7.3.4
pypy2.7-7.3.5-src
pypy2.7-7.3.5
pypy2.7-7.3.6-src
pypy2.7-7.3.6
pypy3-2.3.1-src
pypy3-2.3.1
pypy3-2.4.0-src
pypy3-2.4.0
pypy3.3-5.2-alpha1-src
pypy3.3-5.2-alpha1
pypy3.3-5.5-alpha-src
pypy3.3-5.5-alpha
pypy3.5-c-jit-latest
pypy3.5-5.7-beta-src
pypy3.5-5.7-beta
pypy3.5-5.7.1-beta-src
pypy3.5-5.7.1-beta
pypy3.5-5.8.0-src
pypy3.5-5.8.0
pypy3.5-5.9.0-src
pypy3.5-5.9.0
pypy3.5-5.10.0-src
pypy3.5-5.10.0
pypy3.5-5.10.1-src
pypy3.5-5.10.1
pypy3.5-6.0.0-src
pypy3.5-6.0.0
pypy3.5-7.0.0-src
pypy3.5-7.0.0
pypy3.6-7.0.0-src
pypy3.6-7.0.0
pypy3.6-7.1.0-src
pypy3.6-7.1.0
pypy3.6-7.1.1-src
pypy3.6-7.1.1
pypy3.6-7.2.0-src
pypy3.6-7.2.0
pypy3.6-7.3.0-src
pypy3.6-7.3.0
pypy3.6-7.3.1-src
pypy3.6-7.3.1
pypy3.6-7.3.2-src
pypy3.6-7.3.2
pypy3.6-7.3.3-src
pypy3.6-7.3.3
pypy3.7-c-jit-latest
pypy3.7-7.3.2-src
pypy3.7-7.3.2
pypy3.7-7.3.3-src
pypy3.7-7.3.3
pypy3.7-7.3.4-src
pypy3.7-7.3.4
pypy3.7-7.3.5-src
pypy3.7-7.3.5
pypy3.7-7.3.6-src
pypy3.7-7.3.6
pypy3.7-7.3.7-src
pypy3.7-7.3.7
pypy3.8-7.3.6-src
pypy3.8-7.3.6
pypy3.8-7.3.7-src
pypy3.8-7.3.7
pyston-2.2
pyston-2.3
pyston-2.3.1
stackless-dev
stackless-2.7-dev
stackless-2.7.2
stackless-2.7.3
stackless-2.7.4
stackless-2.7.5
stackless-2.7.6
stackless-2.7.7
stackless-2.7.8
stackless-2.7.9
stackless-2.7.10
stackless-2.7.11
stackless-2.7.12
stackless-2.7.14
stackless-2.7.16
stackless-3.2.2
stackless-3.2.5
stackless-3.3.5
stackless-3.3.7
stackless-3.4-dev
stackless-3.4.2
stackless-3.4.7
stackless-3.5.4
stackless-3.7.5
どのようなバージョンのPythonがインストールできるか確認
$ pyenv install --list
指定したバージョンをインストール
$ pyenv install 3.8.12
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.8.12.tar.xz...
-> https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tar.xz
Installing Python-3.8.12...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
Installed Python-3.8.12 to /Users/ユーザー名/.pyenv/versions/3.8.12
現在インストールされているPythonを一覧で確認
$ pyenv versions
まだ変更されていない
$ python --version
Python 2.7.16
pyenv global 3.6.5
pyenv github ソースコード
https://github.com/pyenv/pyenv#basic-github-checkout
pyenve の環境指定 shell local global
https://www.yoheim.net/blog.php?q=20170204
pyenvのpathの通し方
参考サイト
https://qiita.com/ms903-github/items/fbf53a42ad07aa7424e1
https://timesaving.hatenablog.com/entry/2021/05/15/150000
https://qiita.com/makuramoto1/items/b5aa08d5fc1ce6af0fb4
https://dev.classmethod.jp/articles/pyenv-command-not-found/
$ python --version
Python 2.7.16
$ which python
/usr/bin/python
$ eval "$(pyenv init --path)"
$ which python
/Users/ユーザー名/.pyenv/shims/python
$ python --version
Python 3.8.12
$ pyenv install 3.9.9
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.9.9.tar.xz...
-> https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tar.xz
Installing Python-3.9.9...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
Installed Python-3.9.9 to /Users/ユーザー名/.pyenv/versions/3.9.9
$ pyenv versions
system
* 3.8.12 (set by PYENV_VERSION environment variable)
3.9.9
$ pyenv global 3.9.9
$ pyenv versions
system
* 3.8.12 (set by PYENV_VERSION environment variable)
3.9.9
$ pyenv shell 3.9.9
$ pyenv versions
system
3.8.12
* 3.9.9 (set by PYENV_VERSION environment variable)
$ pyenv local 3.8.12
$ pyenv versions
system
3.8.12
* 3.9.9 (set by PYENV_VERSION environment variable)
glocal, local, shell
shellのみで切り替えられた。
pyenvの場所確認
$ which pyenv
/usr/local/bin/pyenv
デスクトップ上にはエイリアスを作ると良い
エイリアスを削除しても本体には何の影響もない。また、複数作成することもでき、どこに置いてもよい。