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 trialAndrew Padilla
Courses Plus Student 207 PointsI tried running the print ("Hello, Andrew") on a clean console but kept getting the error bash:syntax error near token
"unexpected token, '"Hello, Andrew"'. Why is it placing a single quotation before my standard quote?
2 Answers
jb30
44,807 PointsThe console in the Workspace is a bash
console rather than a python
console. To get to the interactive python console, type python
or python3
in the console in the Workspace. If instead you want to run the file hello.py
from the bash console, type python hello.py
in the console.
shaylee pavlis
Python Development Techdegree Student 197 PointsThe file needs to be saved first did you do that?
Andrew Padilla
Courses Plus Student 207 PointsSaving helped.
Andrew Padilla
Courses Plus Student 207 PointsAndrew Padilla
Courses Plus Student 207 PointsOkay, so basically when I want to see if I am in a bash console I can try running a new code? I am curious how do I know each time I am in a "bash". This is very helpful, thank you.
jb30
44,807 Pointsjb30
44,807 PointsIn the workspaces, if the command prompt is something like
treehouse:~workspace$
(withworkspace
being the name of the folder), then you are in the bash console. The command prompt for the python console is>>>
.