python -vとして、pythonのversionを表示させたいのですが、
下記のように表示されてしまいます。
どのようにしたらversionが表示されるか
教えていただけると幸いです。
import _frozen_importlib # frozen
import _imp # builtin
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import '_warnings' # <class '_frozen_importlib.BuiltinImporter'>
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
import '_frozen_importlib_external' # <class '_frozen_importlib.FrozenImporter'>
import '_io' # <class '_frozen_importlib.BuiltinImporter'>
import 'marshal' # <class '_frozen_importlib.BuiltinImporter'>
import 'nt' # <class '_frozen_importlib.BuiltinImporter'>
import _thread # previously loaded ('_thread')
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import _weakref # previously loaded ('_weakref')
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
import 'winreg' # <class '_frozen_importlib.BuiltinImporter'>
installing zipimport hook
import 'time' # <class '_frozen_importlib.BuiltinImporter'>
import 'zipimport' # <class '_frozen_importlib.FrozenImporter'>
installed zipimport hook
C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\encodings_pycache__init_.cpython-38.pyc matches C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\encodings_init_.py
code object from 'C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\encodings_pycache__init_.cpython-38.pyc'
C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_pycache_\codecs.cpython-38.pyc matches C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\codecs.py
code object from 'C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_pycache_\codecs.cpython-38.pyc'
import '_codecs' # <class '_frozen_importlib.BuiltinImporter'>
import 'codecs' # <_frozen_importlib_external.SourceFileLoader object at 0x016796B8>
C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\encodings_pycache_\aliases.cpython-38.pyc matches C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\encodings\aliases.py
code object from 'C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\encodings_pycache_\aliases.cpython-38.pyc'
import 'encodings.aliases' # <_frozen_importlib_external.SourceFileLoader object at 0x0168E580>
import 'encodings' # <_frozen_importlib_external.SourceFileLoader object at 0x016795C8>
C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\encodings_pycache_\utf_8.cpython-38.pyc matches C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\encodings\utf_8.py
code object from 'C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\encodings_pycache_\utf_8.cpython-38.pyc'
import 'encodings.utf_8' # <_frozen_importlib_external.SourceFileLoader object at 0x016793D0>
C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\encodings_pycache_\cp932.cpython-38.pyc matches C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\encodings\cp932.py
code object from 'C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\encodings_pycache_\cp932.cpython-38.pyc'
import '_codecs_jp' # <class '_frozen_importlib.BuiltinImporter'>
import '_multibytecodec' # <class '_frozen_importlib.BuiltinImporter'>
import 'encodings.cp932' # <_frozen_importlib_external.SourceFileLoader object at 0x0168E5F8>
import '_signal' # <class '_frozen_importlib.BuiltinImporter'>
C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\encodings_pycache_\latin_1.cpython-38.pyc matches C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\encodings\latin_1.py
code object from 'C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\encodings_pycache_\latin_1.cpython-38.pyc'
import 'encodings.latin_1' # <_frozen_importlib_external.SourceFileLoader object at 0x0168E880>
C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_pycache_\io.cpython-38.pyc matches C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\io.py
code object from 'C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_pycache_\io.cpython-38.pyc'
C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_pycache_\abc.cpython-38.pyc matches C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\abc.py
code object from 'C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_pycache_\abc.cpython-38.pyc'
import '_abc' # <class '_frozen_importlib.BuiltinImporter'>
import 'abc' # <_frozen_importlib_external.SourceFileLoader object at 0x0168EAA8>
import 'io' # <_frozen_importlib_external.SourceFileLoader object at 0x0168E940>
C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_pycache_\site.cpython-38.pyc matches C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\site.py
code object from 'C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_pycache_\site.cpython-38.pyc'
C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_pycache_\os.cpython-38.pyc matches C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\os.py
code object from 'C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_pycache_\os.cpython-38.pyc'
C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_pycache_\stat.cpython-38.pyc matches C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\stat.py
code object from 'C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_pycache_\stat.cpython-38.pyc'
import '_stat' # <class '_frozen_importlib.BuiltinImporter'>
import 'stat' # <_frozen_importlib_external.SourceFileLoader object at 0x03281A90>
C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_pycache__collections_abc.cpython-38.pyc matches C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_collections_abc.py
code object from 'C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_pycache__collections_abc.cpython-38.pyc'
import '_collections_abc' # <_frozen_importlib_external.SourceFileLoader object at 0x03281B80>
C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_pycache_\ntpath.cpython-38.pyc matches C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\ntpath.py
code object from 'C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_pycache_\ntpath.cpython-38.pyc'
C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_pycache_\genericpath.cpython-38.pyc matches C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib\genericpath.py
code object from 'C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_pycache_\genericpath.cpython-38.pyc'
import 'genericpath' # <_frozen_importlib_external.SourceFileLoader object at 0x03296160>
import 'ntpath' # <_frozen_importlib_external.SourceFileLoader object at 0x0328FCA0>
import 'os' # <_frozen_importlib_external.SourceFileLoader object at 0x03281178>
C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_pycache__sitebuiltins.cpython-38.pyc matches C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_sitebuiltins.py
code object from 'C:\Users\trise\AppData\Local\Programs\Python\Python38-32\lib_pycache__sitebuiltins.cpython-38.pyc'
import '_sitebuiltins' # <_frozen_importlib_external.SourceFileLoader object at 0x03281F70>
import 'site' # <_frozen_importlib_external.SourceFileLoader object at 0x0168EE98>
Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
import 'atexit' # <class '_frozen_importlib.BuiltinImporter'>
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。