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 trial1 Answer
Chris Freeman
Treehouse Moderator 68,454 PointsPerhaps you need one or more of the following:
include a “python” before it
add current directory to PATH
add . (“dot”, current directory to PATH)
execute using ./ (“dot slash”) before your program name
verify “shebang” correctly points to a python executable (e.g., #!/usr/bin/env python3)
make sure program is executable
$ chmod +x program_name
Post back if you need more help. Good luck!!!
Edward Randall
1,834 PointsEdward Randall
1,834 Pointsi understand your first suggestion. However, the next 5 I am lost. Could you further explain
Chris Freeman
Treehouse Moderator 68,454 PointsChris Freeman
Treehouse Moderator 68,454 PointsEach of the other options are alternative ways to make a python script run if you wanted to try to execute without including python on the command line. In a Linux shell, the command line is interpreted by the shell. The first token is assumed to be an executable, but which one. These other options are ways to hint at the desired executable.