前提・実現したいこと
ここに質問の内容を詳しく書いてください。
Python3でDjangoを使用したいので、
python3をインストールし、2→3に切り替えをしたいです。
いろいろ試してみたのですが、うまくいきません。
以下の情報で不十分でしたら、何の情報が必要かも教えていただければ幸いです。
OS:macOS Big Sur
####python3に変更したい
% pyenv rehash
% pyenv versions
system
3.6.5
3.8.0
- 3.9.6 (set by /Users/gentamac/.pyenv/version)
anaconda3-2019.07
% pyenv global 3.9.6
%
####python3にならない
% python -V
Python 2.7.16
% python3 -V
Python 3.8.3
####pythonを実行してみるがpython2.7.16が実行されてしまう
% python
WARNING: Python 2.7 is not recommended.
This version is included in macOS for compatibility with legacy software.
Future versions of macOS will not include Python 2.7.
Instead, it is recommended that you transition to using 'python3' from within Terminal.
Python 2.7.16 (default, May 8 2021, 11:48:02)
[GCC Apple LLVM 12.0.5 (clang-1205.0.19.59.6) [+internal-os, ptrauth-isa=deploy on darwin
Type "help", "copyright", "credits" or "license" for more information.
####PATH確認
% echo $PATH
/Library/Frameworks/Python.framework/Versions/3.9/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
%
####homebrewのバージョン確認
% brew -v
Homebrew 3.2.0
Homebrew/homebrew-core (git revision 1fed5f6a84; last commit 2021-07-04)
Homebrew/homebrew-cask (git revision fed44fd83e; last commit 2021-07-04)
%
####pyenvのバージョン確認
% pyenv -v
pyenv 2.0.3
%
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/07/04 13:39
2021/07/04 23:16
2021/07/11 04:43