Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Basics (2015) Python for Beginners Running Python Scripts

Ran the script. No error, but it didn't print anything even though I have print("Hello World!") in the first line.

Proof: treehouse:~/workspace$ python hello_world.py
treehouse:~/workspace$ python hello_world.py
treehouse:~/workspace$ python hello_world.py

Mathew Tran
Mathew Tran
Courses Plus Student 10,205 Points

Hey Darryl,

It worked for me when I did the following:

  • Create a file called hello_world.py
  • Add the following code to hello_world.py
print("hello world")
  • Saved the file
  • Ran python hello_world into the workspaces console
  • Got "hello world" printed out from the program

Hope this helps!

Matt

2 Answers

It looks like you are doing everything fine. Mathew Tran has pointed out the steps. I would suggest you restart the workspaces window. Sometimes that's all it takes. I had a similar problem before and when I restarted the workspaces it worked fine. Clear the cache and try again. Let us know if it worked.

Alexander Logrono
Alexander Logrono
2,841 Points

I had the same issue and then I noticed that I forgot to save the script. Which is really important. If you see a red dot next to the script window tab then you know you forgot to save.