Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Python Basics (2015) Python for Beginners Third Quiz

I answered "python3 hello_treehouse.py" It told me I was wrong. I am on Linux and actually right.

The actual questoin is "I have a script named hello_treehouse.py. How would I run that?" I am more than willing to just substitute python for python3. I was more than a little annoyed when it told me I was wrong though. My method insures that I am correctly calling python 3 instead of python 2 on my local stack.

1 Answer

Chris Freeman
Chris Freeman
Treehouse Moderator 68,167 Points

It is not looking for the specific python version. "python hello_treehouse.py" is sufficient.

On many linux systems /usr/bin/python is redirected to either python2.7 or python3.4, etc. In many cases you can change this link to change the default version used on your system. Try:

$ ls -l /usr/bin/python*

In using virtualenv configurations, the version of python is locked into the venv so python points to the venv version and can change from one venv to another. This saves from having to mess with the /usr/bin links.

Sorry for the super late response. I forgot to say thank you. So thank you!