Python Forum
Going thru tutorials..."NameError: name 'raw_input' is not defined"
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Going thru tutorials..."NameError: name 'raw_input' is not defined"
#1
I'm a total newbie, wrote machine code for years at GE, Digital Communications stuff. Off to try to learn Python.
In going thru the tutorials in one of the 'dummies' books, they have an example using raw_input(), and I get this error message
Error:
"NameError: name 'raw_input' is not defined"
now I presume i have not loaded some needed library. I downloaded and installed python 3.8, is there something else I must do?
Thanks, Henri Monnier
Reply
#2
The tutorial you have is out of date, it is for python2.
input is used in python3 in place of raw_input.
Reply
#3
(Jul-13-2020, 09:39 PM)Yoriz Wrote: The tutorial you have is out of date, it is for python2.
input is used in python3 in place of raw_input.

Yoriz,
Is there a list that helps a newbie like me to be aware of the changes betwixt version 2 and 3. That would be a GREAT help for those of us that are trying to learn.
Thanks..... Henri Monnier...
Reply
#4
See
Should I use Python 2 or Python 3 for my development activity?
and the previous version of this page
Should I use Python 2 or Python 3 for my development activity?
Reply
#5
NOTE: Python 2 might be simpler in some respects, but now that more people are transferring to python 3,
you might need to use python 3 in order to better comprehend code.
I am also aware some changes in Try and Except statements.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  NameError: name 'Particle' is not defined in Pygame drunkenneo 4 319 Aug-15-2021, 06:12 PM
Last Post: bowlofred
  NameError: name 'u1' is not defined (on parser code Python) Melcu54 1 316 Jul-26-2021, 04:36 PM
Last Post: snippsat
  I am getting a NameError that is not defined and not sure why it happen rick0922 5 556 Jun-14-2021, 03:41 PM
Last Post: deanhystad
  [split] NameError: name 'start_with_first_selected' is not defined knoxvilles_joker 4 741 Apr-18-2021, 07:59 PM
Last Post: knoxvilles_joker
  Zlib tutorials Vwjap 2 702 Mar-13-2021, 09:22 PM
Last Post: Vwjap
  “NameError” “is not defined” script that I know works on other computers iamwithstupid 0 679 Nov-24-2020, 04:23 PM
Last Post: iamwithstupid
  NameError: name 'L2' is not defined soshelby 5 1,120 Nov-05-2020, 08:50 PM
Last Post: soshelby
  NameError: name 'target_id' is not defined bhagyashree 7 1,072 Nov-03-2020, 10:22 AM
Last Post: bhagyashree
  code not working, NameError: name 's' is not defined ridgerunnersjw 4 1,135 Oct-05-2020, 07:03 PM
Last Post: buran
  NameError: name 'pins' is not defined glennford49 2 1,720 Jun-15-2020, 12:20 PM
Last Post: glennford49

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020