質問編集履歴
1
quickquipさんに指摘していただいたことをもとに「試したこと」「補足情報」を変更しました。
    
        title	
    CHANGED
    
    | 
            File without changes
         | 
    
        body	
    CHANGED
    
    | @@ -46,16 +46,52 @@ | |
| 46 46 |  | 
| 47 47 | 
             
            ### 試したこと
         | 
| 48 48 | 
             
            ・Homebrewのアップデート
         | 
| 49 | 
            +
            $ brew update
         | 
| 50 | 
            +
             | 
| 49 51 | 
             
            ・pyenvのアップデート
         | 
| 52 | 
            +
            $ brew upgrade
         | 
| 53 | 
            +
             | 
| 50 54 | 
             
            ・https://qiita.com/koooooo/items/b21d87ffe2b56d0c589b
         | 
| 55 | 
            +
            こちらのサイトを参考に
         | 
| 56 | 
            +
            $ git clone git://github.com/yyuu/pyenv.git ~/.pyenv
         | 
| 57 | 
            +
            $ brew install pyenv
         | 
| 58 | 
            +
            $ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
         | 
| 59 | 
            +
            $ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
         | 
| 60 | 
            +
            $ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
         | 
| 61 | 
            +
            $ source ~/.bash_profile
         | 
| 62 | 
            +
             | 
| 51 63 | 
             
            ・https://oku.edu.mie-u.ac.jp/~okumura/macosx/m1.html
         | 
| 64 | 
            +
            こちらのサイトを参考に
         | 
| 65 | 
            +
            $ arch -x86_64 uname -m
         | 
| 66 | 
            +
            $ arch -x86_64 zsh
         | 
| 67 | 
            +
            $ cd /opt
         | 
| 68 | 
            +
            $ curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
         | 
| 69 | 
            +
             | 
| 52 70 | 
             
            ・https://techsviewer.com/how-to-install-python-on-mac/
         | 
| 71 | 
            +
            こちらのサイトを参考に
         | 
| 72 | 
            +
            $ brew install python
         | 
| 73 | 
            +
            $ cd
         | 
| 74 | 
            +
            $ nano ~/.bash
         | 
| 75 | 
            +
            dot fileの中で
         | 
| 76 | 
            +
            alias python=python3
         | 
| 77 | 
            +
            を記述
         | 
| 78 | 
            +
            ターミナル上で
         | 
| 79 | 
            +
            $ source ~/.bash
         | 
| 80 | 
            +
             | 
| 53 81 | 
             
            ・https://www.takapy.work/entry/2019/02/11/161419
         | 
| 82 | 
            +
            こちらのサイトを参考に
         | 
| 83 | 
            +
            $ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
         | 
| 84 | 
            +
             | 
| 54 85 | 
             
            ・https://child-programmer.com/pe-bs-2021/
         | 
| 55 | 
            -
             | 
| 86 | 
            +
            こちらのサイトを参考に
         | 
| 87 | 
            +
            $ arch -arm64 brew reinstall zlib bzip2
         | 
| 88 | 
            +
            $ CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib" pyenv install --patch 3.8.12 < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch?full_index\=1)
         | 
| 56 89 | 
             
            ### 補足情報(FW/ツールのバージョンなど)
         | 
| 57 90 | 
             
            「実行環境」
         | 
| 58 91 | 
             
            ・MacBook Air(M1, 2020)
         | 
| 92 | 
            +
            ・チップ Apple M1
         | 
| 59 | 
            -
            ・macOS Monterey
         | 
| 93 | 
            +
            ・macOS Monterey v12.0.1
         | 
| 60 | 
            -
             | 
| 61 | 
            -
             | 
| 94 | 
            +
            ・ターミナルはRosetta2を使用しています
         | 
| 95 | 
            +
            ・ターミナル:zsh
         | 
| 96 | 
            +
            ・Home-brew v3.3.4(M1対応です)
         | 
| 97 | 
            +
            ・pyenv v2.2.0
         | 
