python-build: use readline from homebrew Downloading Python-3.9.5.tar.xz... -> https://www.python.org/ftp/python/3.9.5/Python-3.9.5.tar.xz Installing Python-3.9.5... python-build: use readline from homebrew Installed Python-3.9.5 to /Users/user/.anyenv/envs/pyenv/versions/3.9.5
# If your ~/.profile sources ~/.bashrc, # the lines need to be inserted before the part # that does that. See the README for another option.
# If you have ~/.bash_profile, make sure that it # also executes the above lines -- e.g. by # copying them there or by sourcing ~/.profile
# Load pyenv into the shell by adding # the following to ~/.bashrc:
eval "$(pyenv init -)"
# Make sure to restart your entire logon session # for changes to profile files to take effect.
anyenvを利用しているためPATHが少し違いますので注意が必要です。
動作確認
早速動作確認をしてみます
1 2 3 4 5 6 7
$ python Python 3.7.9 (default, Nov 16 2020, 18:18:20) [Clang 10.0.0 (clang-1000.10.44.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> exit Use exit() or Ctrl-D (i.e. EOF) to exit >>> $
$ ls -a . .. $ pyenv local 3.9.5 $ ls -a . .. .python-version $ python Python 3.9.5 (default, Jun 8 2021, 23:01:54) [Clang 10.0.0 (clang-1000.10.44.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>>