前提・実現したいこと
Macのターミナルの初期化をしたいです
発生している問題・エラーメッセージ
プログラミングの勉強をしようと思い、python3系をインストールしようと progateやYouTubeなどを見て実行しましたが、python -vで確認しようとすると 下記の今までは出ていなかった文が出てきたので一度初期化したいと思ってます # installing zipimport hook import zipimport # builtin # installed zipimport hook # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.pyc is on a sealed volume, skip mtime check import site # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.pyc # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.pyc is on a sealed volume, skip mtime check import os # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.pyc import errno # builtin import posix # builtin # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.pyc is on a sealed volume, skip mtime check import posixpath # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.pyc # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/stat.pyc is on a sealed volume, skip mtime check import stat # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/stat.pyc # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/genericpath.pyc is on a sealed volume, skip mtime check import genericpath # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/genericpath.pyc # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/warnings.pyc is on a sealed volume, skip mtime check import warnings # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/warnings.pyc # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/linecache.pyc is on a sealed volume, skip mtime check import linecache # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/linecache.pyc # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/types.pyc is on a sealed volume, skip mtime check import types # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/types.pyc # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.pyc is on a sealed volume, skip mtime check import UserDict # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.pyc # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_abcoll.pyc is on a sealed volume, skip mtime check import _abcoll # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_abcoll.pyc # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/abc.pyc is on a sealed volume, skip mtime check import abc # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/abc.pyc # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_weakrefset.pyc is on a sealed volume, skip mtime check import _weakrefset # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_weakrefset.pyc import _weakref # builtin # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy_reg.pyc is on a sealed volume, skip mtime check import copy_reg # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy_reg.pyc # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/traceback.pyc is on a sealed volume, skip mtime check import traceback # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/traceback.pyc # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.pyc is on a sealed volume, skip mtime check import sysconfig # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.pyc # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.pyc is on a sealed volume, skip mtime check import re # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.pyc # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_compile.pyc is on a sealed volume, skip mtime check import sre_compile # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_compile.pyc import _sre # builtin # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_parse.pyc is on a sealed volume, skip mtime check import sre_parse # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_parse.pyc # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_constants.pyc is on a sealed volume, skip mtime check import sre_constants # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_constants.pyc dlopen("/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so", 2); import _locale # dynamically loaded from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_sysconfigdata.pyc is on a sealed volume, skip mtime check import _sysconfigdata # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_sysconfigdata.pyc # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_osx_support.pyc is on a sealed volume, skip mtime check import _osx_support # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_osx_support.pyc import encodings # directory /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/__init__.pyc is on a sealed volume, skip mtime check import encodings # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/__init__.pyc # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.pyc is on a sealed volume, skip mtime check import codecs # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.pyc import _codecs # builtin # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/aliases.pyc is on a sealed volume, skip mtime check import encodings.aliases # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/aliases.pyc # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.pyc is on a sealed volume, skip mtime check import encodings.utf_8 # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.pyc 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.18 (default, Nov 13 2021, 06:17:34) [GCC Apple LLVM 13.0.0 (clang-1300.0.29.10) [+internal-os, ptrauth-isa=deployme on darwin Type "help", "copyright", "credits" or "license" for more information. dlopen("/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so", 2); import readline # dynamically loaded from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so >>> ```python ### 試したこと 他に症例が見当たりませんでした。 ### 補足情報(FW/ツールのバージョンなど) python -vとコマンドを打つと2.7.18と古いものみたいで pyenvから3系をinstall後にもう一度python-vで確認しても2.7.18と変わらず いろいろなサイトを見て試行錯誤してみましたが上手くいかず 最終的に以前は2.7.18とversionが出るだけでしたがあのような文字列が出てきてしまいおかしくなったのかと
実行しているpython -vは至極まっとうに動作しているように見えます。
次の3点を実施したほうが良いと思います。
- 「何を見て」実行したかの具体的な情報の追記
- 「『何を』確認しようとしたのか」の追記
- python --help で実行したコマンドが何をしているかの把握
ありがとうございます。
補足欄に追記してみました。
python --helpで実行してみましたが説明文みたいなもので特に何かが動いているようなことはありませんでした。
python --help をみれば python -v の意味がわかるだろうという指摘ですね。
まあ、-v と -V を間違えていたというオチですが。
そういうことだったんですね、、、
ありがとうございます。。
回答3件
あなたの回答
tips
プレビュー