Installing python

I have tried to install Python 3.4 on Windows 7 using the following guide I have added the following to my Path in system environmental variables

C:Python34;C:Python34Scripts;

When I open up the Python command line and type the following (as instructed in the tutorial) I receive an error message printed below

Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:15:05) [MSC v.1600 32 bit (In tel)] on win32 Type "help", "copyright", "credits" or "license" for more information.

python --version <- what i type

Traceback (most recent call last): File "", line 1, in NameError: name 'python' is not defined

Can anyone help me out?


You need to type python --version from the command line. Not when you are already running python.


As has been mentioned, you need to run your command from the command prompt:

python --version

However, if you are in the python interpreter, you can find the current version with this code:

import sys
print (sys.version)
链接地址: http://www.djcxy.com/p/48664.html

上一篇: 如何从CMD运行Pip命令

下一篇: 安装python