[Tutor] Invalid Syntax Message

Alan Gauld alan.gauld at btinternet.com
Tue Sep 15 01:38:42 CEST 2015


On 14/09/15 22:50, Shannon Rodenbeck wrote:
> I have downloaded Python 3.4.3 on my Mac 10.10.4. When i try running my
> programs from IDLE to go on Shell i get the message that says "Invalid
> Syntax". I've tried my programs on a different windows computer and it runs
> and works perfectly. How do I fix this problem so the programs are able to
> run on my Mac.

Are you absolutely sure the two machines are running the same
python versions? Try this on both:

import sys
print(sys.version)

In particular make sure that the IDLE version matches the
interpreter version you expect.

If its all OK then show  us the actual code and actual
error message (all of it).

One final thing to try is running your code on the Mac under the 
Terminal app:

$ python3 yourscript.py

See if that works differently.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list