Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed the 2.5.6 version from (the .tgz). It seems to have installed correctly, but I am having problems when I go to use it. I open up the command-line version, and it looks OK, but if I type any commands and try to execute them it gives me errors.

This is my first venture into Python, and I could be doing this completely wrong. I am also unable to change directories using the command line. I have a sample program in a directory: I see the following in my command prompt:

Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64-bit (AMD64)] on Windows 32
Type "help", "copyright", "credits" or "license" for more information.

I entered the following:

>>> python

The following message returned:

File "<stdin>", line 1
SyntaxError: Invalid syntax

Now it could be a syntax error, but I do not see anything; it is a simple "Hello world" program. I am not comfortable with the install and fear I may have screwed things up.

share|improve this question

You're supposed to type python outside the Python shell, on the command prompt, not inside the Python shell.

share|improve this answer
I did this and I am getting a syntax error. My entire program is: Print "test!" I am not sure if i have downloaded a different version but the sample that I am learning from has this as the syntax. I must be missing something. – Silspar24 Jun 28 '11 at 0:42
@Silspar24 - it's print "test!" not Print "test!" – Sathya Jun 28 '11 at 2:15
Use brackets, print("test") – Red2awn Nov 14 '14 at 22:06

There are a few things that could be wrong, and one that is definitely wrong.

Things that are definitely wrong

  • When executing a file, type python from the command prompt, not inside the Python interpreter.

Things that could be wrong

  • If you have Python 3.x installed, when printing "Hello World!" make sure you use brackets in print, ex:


    print('Hello World!')


    print 'Hello World!'

Also, if you have Python 2.7 or earlier installed, this is still a good habit to get into when programming, and will make the eventual transition to 3.x much smoother.

  • You said in your example that you typed Print "Hello World" - in this example the print function/statement should not be capitalized.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.