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 trialJoel Corey
2,728 PointsI 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
Treehouse Moderator 68,441 PointsIt 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.
Joel Corey
2,728 PointsJoel Corey
2,728 PointsSorry for the super late response. I forgot to say thank you. So thank you!