Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 am running Ubuntu 12.04 and just installed python 3.2.3 tried to save and run the "hello world program". But it will not run I keep getting a syntax error. How do you run a program in python ????.

share|improve this question

closed as unclear what you're asking by Eric Carvalho, Thomas Ward, Jorge Castro, Seth, hexafraction Jul 8 '13 at 2:17

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

This question appears to be off-topic because it is about programming, try – Jorge Castro Jul 7 '13 at 18:29

To run a Python file, open a terminal and type: python /directory/to/

You can also make Python files executable without having to run them from the terminal but I prefer this approach, it allows for such errors to be displayed.

To return a print vaule in Python 3.2.3 use the syntax: print("Hello, world!")


helloWorld = "Hello, World!"

share|improve this answer

Taking a complete guess, since you didn't provide any code, you're trying to run:

print "Hello, world!"

Had you looked at a reference for Python 3 written in the past, oh, 3 years or so, you would've known that print is a function in Python 3.

print("Hello, world!")
share|improve this answer

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