Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Checking version after installing Python 3.4.4 on Windows vista gives unexpected results

I just installed Python 3.4.4 recently by running the installer and changing the environment variables. I also tried some simple commands to see if it was installed correctly and it was. However, when I typed python -v into the command line, this is what I got:

import _frozen_importlib # frozen
import imp # builtin
import sys # builtin
# installing zipimport hook
# installed zipimport hook
# C:\Python34\lib\encodings\__pycache__\__init__.cpython-34.pyc matches C:\Pytho
n34\lib\encodings\__init__.py
# code object from 'C:\\Python34\\lib\\encodings\\__pycache__\\__init__.cpython-
34.pyc'
# C:\Python34\lib\__pycache__\codecs.cpython-34.pyc matches C:\Python34\lib\code
cs.py
# code object from 'C:\\Python34\\lib\\__pycache__\\codecs.cpython-34.pyc'
import 'codecs' # <_frozen_importlib.SourceFileLoader object at 0x01EC1170>
# C:\Python34\lib\encodings\__pycache__\aliases.cpython-34.pyc matches C:\Python
34\lib\encodings\aliases.py
# code object from 'C:\\Python34\\lib\\encodings\\__pycache__\\aliases.cpython-3
4.pyc'
import 'encodings.aliases' # <_frozen_importlib.SourceFileLoader object at 0x01E
C6E90>
import 'encodings' # <_frozen_importlib.SourceFileLoader object at 0x01D83C30>
# C:\Python34\lib\encodings\__pycache__\mbcs.cpython-34.pyc matches C:\Python34\
lib\encodings\mbcs.py
# code object from 'C:\\Python34\\lib\\encodings\\__pycache__\\mbcs.cpython-34.p
yc'
import 'encodings.mbcs' # <_frozen_importlib.SourceFileLoader object at 0x01EC62
F0>
# C:\Python34\lib\encodings\__pycache__\utf_8.cpython-34.pyc matches C:\Python34
\lib\encodings\utf_8.py
# code object from 'C:\\Python34\\lib\\encodings\\__pycache__\\utf_8.cpython-34.
pyc'
import 'encodings.utf_8' # <_frozen_importlib.SourceFileLoader object at 0x01ED9
190>
# C:\Python34\lib\encodings\__pycache__\latin_1.cpython-34.pyc matches C:\Python
34\lib\encodings\latin_1.py
# code object from 'C:\\Python34\\lib\\encodings\\__pycache__\\latin_1.cpython-3
4.pyc'
import 'encodings.latin_1' # <_frozen_importlib.SourceFileLoader object at 0x01E
D92B0>
# C:\Python34\lib\__pycache__\io.cpython-34.pyc matches C:\Python34\lib\io.py
# code object from 'C:\\Python34\\lib\\__pycache__\\io.cpython-34.pyc'
# C:\Python34\lib\__pycache__\abc.cpython-34.pyc matches C:\Python34\lib\abc.py
# code object from 'C:\\Python34\\lib\\__pycache__\\abc.cpython-34.pyc'
# C:\Python34\lib\__pycache__\_weakrefset.cpython-34.pyc matches C:\Python34\lib
\_weakrefset.py
# code object from 'C:\\Python34\\lib\\__pycache__\\_weakrefset.cpython-34.pyc'
import '_weakrefset' # <_frozen_importlib.SourceFileLoader object at 0x01ED99F0>

import 'abc' # <_frozen_importlib.SourceFileLoader object at 0x01ED9550>
import 'io' # <_frozen_importlib.SourceFileLoader object at 0x01ED93B0>
# C:\Python34\lib\encodings\__pycache__\cp437.cpython-34.pyc matches C:\Python34
\lib\encodings\cp437.py
# code object from 'C:\\Python34    \\lib\\encodings\\__pycache__\\cp437.cpython-34.
pyc'
import 'encodings.cp437' # <_frozen_importlib.SourceFileLoader object at 0x01EE4
7D0>
# C:\Python34\lib\__pycache__\site.cpython-34.pyc matches C:\Python34\lib\site.p
y
# code object from 'C:\\Python34\\lib\\__pycache__\\site.cpython-34.pyc'
# C:\Python34\lib\__pycache__\os.cpython-34.pyc matches C:\Python34\lib\os.py
# code object from 'C:\\Python34\\lib\\__pycache__\\os.cpython-34.pyc'
# C:\Python34\lib\__pycache__\stat.cpython-34.pyc matches C:\Python34\lib\stat.p
y
# code object from 'C:\\Python34\\lib\\__pycache__\\stat.cpython-34.pyc'
import 'stat' # <_frozen_importlib.SourceFileLoader object at 0x01EF91D0>
# C:\Python34\lib\__pycache__\ntpath.cpython-34.pyc matches C:\Python34\lib\ntpa
th.py
# code object from 'C:\\Python34\\lib\\__pycache__\\ntpath.cpython-34.pyc'
# C:\Python34\lib\__pycache__\genericpath.cpython-34.pyc matches C:\Python34\lib
\genericpath.py
# code object from 'C:\\Python34\\lib\\__pycache__\\genericpath.cpython-34.pyc'
import 'genericpath' # <_frozen_importlib.SourceFileLoader object at 0x01EFE330>

import 'ntpath' # <_frozen_importlib.SourceFileLoader object at 0x01EF9590>
# C:\Python34\lib\__pycache__\_collections_abc.cpython-34.pyc matches C:\Python3
4\lib\_collections_abc.py
# code object from 'C:\\Python34\\lib\\__pycache__\\_collections_abc.cpython-34.
pyc'
import '_collections_abc' # <_frozen_importlib.SourceFileLoader object at 0x01EF
E630>
import 'os' # <_frozen_importlib.SourceFileLoader object at 0x01EEE610>
# C:\Python34\lib\__pycache__\_sitebuiltins.cpython-34.pyc matches C:\Python34\l
ib\_sitebuiltins.py
# code object from 'C:\\Python34\\lib\\__pycache__\\_sitebuiltins.cpython-34.pyc
'
import '_sitebuiltins' # <_frozen_importlib.SourceFileLoader object at 0x01EEE87
0>
# C:\Python34\lib\__pycache__\sysconfig.cpython-34.pyc matches C:\Python34\lib\s
ysconfig.py
# code object from 'C:\\Python34\\lib\\__pycache__\\sysconfig.cpython-34.pyc'
import 'sysconfig' # <_frozen_importlib.SourceFileLoader object at 0x01EEEAF0>
# C:\Python34\lib\__pycache__\_bootlocale.cpython-34.pyc matches C:\Python34\lib
\_bootlocale.py
# code object from 'C:\\Python34\\lib\\__pycache__\\_bootlocale.cpython-34.pyc'
import '_bootlocale' # <_frozen_importlib.SourceFileLoader object at 0x0242F9B0>

# C:\Python34\lib\encodings\__pycache__\cp1252.cpython-34.pyc matches C:\Python3
4\lib\encodings\cp1252.py
# code object from 'C:\\Python34\\lib\\encodings\\__pycache__\\cp1252.cpython-34
.pyc'
import 'encodings.cp1252' # <_frozen_importlib.SourceFileLoader object at 0x0242
FC90>
import 'site' # <_frozen_importlib.SourceFileLoader object at 0x01EE4A90>
Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 19:28:18) [MSC v.1600 32 bit (In
tel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

Alternately, when I typed python -version, this is what I got:

Unknown option: -e
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.

So I am not sure if there was any part that I installed wrongly that led to these. Hope someone can help.

like image 469
annena Avatar asked Jan 20 '16 07:01

annena


People also ask

Can Python be run on Windows Vista?

As specified in PEP 11, a Python release only supports a Windows platform while Microsoft considers the platform under extended support. This means that Python 3.6 supports Windows Vista and newer. If you require Windows XP support then please install Python 3.4.

Where is Python installed on Windows?

py installed location is C:\Windows\py.exe if installed for all users, otherwise can be found at C:\Users\username\AppData\Local\Programs\Python\Launcher . It does not require the environment PATH variable to be set if installed for all users.


1 Answers

Your installation is fine, the -v command line option doesn't stand for version.

-v Print a message each time a module is initialized, showing the place (filename or built-in module) from which it is loaded. When given twice, print a message for each file that is checked for when searching for a module. Also provides information on module cleanup at exit.

Instead to check version you'll have to use --version or -V:

python --version

Python is attempting to interpret each character of version as a seperate command line option when you prefix it with a single hyphen.

Typically words as command line options are prefixed with two hyphens and single characters only one or none. You can read more about the POSIX guide on command line options here.

like image 61
jacob Avatar answered Dec 12 '22 05:12

jacob