Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hey, I'm trying to learn how to program so I've installed the latest version of Python and I've been following the Byte of Python tutorial. I'm using Textwrangler I've only gotten as far as the simple "Hello World" intro and I'm already having a problem. I type out the code:



print('Hello World')

and save it to my desktop as I then go into terminal and type "python3" and I get the following error message:

/Library/Frameworks/Python.framework/Versions/3.1/Resources/ can't open file '': [Errno 2] No such file or directory

I was hoping someone could tell me what I'm doing wrong. If I choose to run the script from Textwrangler it operates just fine however I'm not able to access it from the Terminal. Thanks so much!

share|improve this question
up vote 1 down vote accepted

You need to be in the same directory in the terminal that you saved the file in or you need to specify the full directory on the command line:

cd /path/to/directory


python3 /path/to/directory/

What directory did you save the file to?

share|improve this answer
Awesome thank you so much I think I understand how it works now. I just had to specify that it was in /users/username/desktop python3 Thanks so much for the help! – Stephen Feb 4 '11 at 17:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.