WAkeBOarDEr
Posts: 4
Joined: Thu Jan 09, 2014 12:32 am

HELP ME PLEASE

Thu Jan 09, 2014 12:40 am

I keep getting the same syntax error "Phython 3.2.3 ...." and the 3.2.3 is highlighted.
What should I do?

User avatar
rpdom
Posts: 17172
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: HELP ME PLEASE

Thu Jan 09, 2014 7:16 am

Perhaps show us all of the message(s) and tell us what you are doing when it happens...

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: HELP ME PLEASE

Thu Jan 09, 2014 9:01 am

WAkeBOarDEr wrote: What should I do?
Make your subject line more detailed.

WAkeBOarDEr
Posts: 4
Joined: Thu Jan 09, 2014 12:32 am

Re: HELP ME PLEASE

Mon Jan 13, 2014 9:17 pm

Python 3.2.3 (default, Mar 1 2013, 11:53:50)
[GCC 4.6.3] on linux2
Type "copyright", "credits" or "license()" for more information.
>>> #!/usr/bin/env python
>>> print "hello world" last quotetation is highlighted
SyntaxError: invalid syntax
>>>

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: HELP ME PLEASE

Mon Jan 13, 2014 9:22 pm

You're using python2 syntax with python3.

Start here: http://docs.python-guide.org/en/latest/intro/learning/
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

keybeeper
Posts: 26
Joined: Wed Aug 08, 2012 10:15 am

Re: HELP ME PLEASE

Mon Jan 13, 2014 9:45 pm

The print parameters are in parentheses for Python3

print("hello world")
No Microsoft products were used in the creation of this message

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: HELP ME PLEASE

Tue Jan 14, 2014 2:29 am

Code: Select all

#!/usr/bin/env python
is only used as the first line of a standalone .py script (it tells the bash shell which program to use to run the script) - you shouldn't ever type it into the python interactive console.

WAkeBOarDEr
Posts: 4
Joined: Thu Jan 09, 2014 12:32 am

Re: HELP ME PLEASE

Thu Jan 16, 2014 10:46 pm

DougieLawson wrote:You're using python2 syntax with python3.

Start here: http://docs.python-guide.org/en/latest/intro/learning/
How do i fix this? Where do I get the download?

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: HELP ME PLEASE

Fri Jan 17, 2014 8:04 am

Both Python 2 and 3 are pre-installed on the Raspberry . Choose one Python version and then choose
a tutorial - it should explain how to start Python already.


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

WAkeBOarDEr
Posts: 4
Joined: Thu Jan 09, 2014 12:32 am

Re: HELP ME PLEASE

Sat Jan 18, 2014 9:51 pm

is there any difference in IDLE and IDLE 3?

User avatar
DeeJay
Posts: 2027
Joined: Tue Jan 01, 2013 9:33 pm
Location: East Midlands, UK

Re: HELP ME PLEASE

Sat Jan 18, 2014 10:01 pm

WAkeBOarDEr wrote:is there any difference in IDLE and IDLE 3?

IDLE uses python. (On the RPi running Raspbian, that will be python version 2.something)


IDLE3 uses python3.
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

Return to “Troubleshooting”