For Python 3.x, use input(). For Python 2.x, use raw_input(). Don't forget you can add a prompt string in your input() call to create one less print statement. input("GUESS THAT NUMBER!").

Answer from heinst on Stack Overflow
🌐
PsychoPy
discourse.psychopy.org › coding
NameError: name 'raw_input' is not defined when debugging in PyCharm - Coding - PsychoPy
January 31, 2022 - I am new to Psychopy, and I am trying to tinker around to create a stimulus with the psychopy module in Python. I am in Linux (Ubuntu) and use a virtual environment in PyCharm with a Python 3.8 interpreter. When I run the code normally, everything works fine however if I put a break point anywhere and run the debugger it throws me this error: Traceback (most recent call last): File " ", line 25, in NameError: name 'raw_input' is not defined python-BaseException This is the ...
Discussions

How do I use raw_input in Python 3? - Stack Overflow
In Python 2: raw_input() In Python 3, I get an error: NameError: name 'raw_input' is not defined More on stackoverflow.com
🌐 stackoverflow.com
(Only) when importing in debug mode: name 'raw_input' is not defined
Describe the bug When I run import mujoco_py using the debugger in CLion (v2020.1.2, but also with a pervious version), the program chrashed with the error message below. Running this script works ... More on github.com
🌐 github.com
6
August 12, 2022
python - Raw_Input() Is Not Defined - Stack Overflow
I'm a seventh grade programmer so I may be missing a lot of things in this program, but for my coding club my instructor asked us to make a guess the number game. I have very limited knowledge on t... More on stackoverflow.com
🌐 stackoverflow.com
April 26, 2017
NameError: name 'raw_input' is not defined
num=int(raw_input("\nPon numero")); rev=0; while(num!=0): rev=rev*10; rev=rev+num % 10; num=num/10; print(“Numero de reversa:”,rev); More on discuss.codecademy.com
🌐 discuss.codecademy.com
0
0
September 8, 2019
🌐
Quora
quora.com › How-do-I-solve-name-error-name-raw_input-is-not-defined-in-Python
How to solve “name error: name 'raw_input' is not defined” in Python - Quora
I encountered the same issue when ... 3, it's been replaced with input(). So, to fix the error, simply replace raw_input() with input() in your code, and it should work as expected....
🌐
Career Karma
careerkarma.com › blog › python › python nameerror: name ‘raw_input’ is not defined solution
Python NameError: name 'raw_input' is not defined Solution
December 1, 2023 - Traceback (most recent call last): File "main.py", line 1, in <module> numerical_grade = int(raw_input("Enter a grade: ")) NameError: name 'raw_input' is not defined · Our code returns an error. The error message tells us we are referencing a value that does not exist. Because we are using Python 3.x to run our program, raw_input() does not exist.
🌐
Bobby Hadz
bobbyhadz.com › blog › python-nameerror-name-raw-input-is-not-defined
NameError: name 'raw_input' is not defined in Python [Fixed] | bobbyhadz
Make sure to replace all calls to the raw_input() function with input() in Python 3. The input() function takes an optional prompt argument and writes it to standard output without a trailing newline.
🌐
Its Linux FOSS
itslinuxfoss.com › home › python › nameerror: name ‘raw_input’ is not defined in python
NameError: name ‘raw_input’ is not defined in Python – Its Linux FOSS
November 29, 2022 - The “name raw_input is not defined” error arises when the user uses the “raw_input()” function in Python3. To solve this, use the simple “input()” function that takes the “prompt” value as an argument and returns the string.
🌐
GitHub
github.com › ianmiell › shutit › issues › 299
Raw input is not defined · Issue #299 · ianmiell/shutit
June 10, 2017 - Installing on ArchLinux with sudo pip install shutit # defaults to pip3 and then running shutit skeleton results in the following error: NameError: name 'raw_input' is not defined Full trac...
Author   ghost
Find elsewhere
🌐
GitHub
github.com › slashmili › alchemist.vim › issues › 34
NameError: name 'raw_input' is not defined · Issue #34 · slashmili/alchemist.vim
April 26, 2019 - OS X, Python 2.7.11 got this when using K to get ExDoc on function Traceback (most recent call last): File "/Users/alexander/.vim/plugged/alchemist.vim/after/../alchemist_client", line 79, in main(sys.argv[1:]) File "/Users/alex...
🌐
Edureka Community
edureka.co › home › community › categories › python › nameerror name raw input is not defined
NameError name raw input is not defined | Edureka Community
September 3, 2018 - I'm a seventh-grade programmer so I may be missing a lot of things in this program, but for my ... code, but it seems to not like the raw_input().
🌐
GitHub
github.com › openai › mujoco-py › issues › 544
(Only) when importing in debug mode: name 'raw_input' is not defined · Issue #544 · openai/mujoco-py
August 12, 2022 - To Reproduce Set up a system as descibed below (For me Python 3.8 is decisive here), a debugger, and try importing the module. Expected behavior Same behavior as for running the py-file without a debugger. ... pydev debugger: process 21411 is connecting Connected to pydev debugger (build 201.7846.88) Traceback (most recent call last): File "<string>", line 25, in <module> NameError: name 'raw_input' is not defined
Author   famura
🌐
Sololearn
sololearn.com › en › Discuss › 841578 › raw_input-not-defined
raw_input not defined | Sololearn: Learn to code for FREE!
I am trying to create a program that would require user input in the console using raw_input, but when I use it like so: raw_input = ("Enter your age") It returns the error "raw_input not defined" Can someone please explain how to use raw_input? Thank you so much :) ... raw_input() is a Python 2 command, for Python 3 (implemented in Sololearn's Code Playground) the right command is input()
🌐
Codecademy Forums
discuss.codecademy.com › get help › python
NameError: name 'raw_input' is not defined - Python - Codecademy Forums
September 8, 2019 - num=int(raw_input("\nPon numero")); rev=0; while(num!=0): rev=rev*10; rev=rev+num % 10; num=num/10; print(“Numero de reversa:”,rev);
🌐
Python Forum
python-forum.io › thread-28312.html
Going thru tutorials..."NameError: name 'raw_input' is not defined"
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:'N...
🌐
Edureka Community
edureka.co › home › community › categories › python › raw input is not defined
Raw Input Is Not Defined | Edureka Community
September 17, 2018 - I'm a seventh grade programmer so I may be missing a lot of things in this program, but for my ... code, but it seems to not like the raw_input().
🌐
PythonAnywhere
pythonanywhere.com › forums › topic › 32318
Resetting Web2py Administrator password - "raw_input not defined" error : Forums : PythonAnywhere
January 19, 2023 - python -c "from gluon.main import save_password; save_password(raw_input('admin password: '),443)" ... Traceback (most recent call last): File "<string>", line 1, in <module> NameError: name 'raw_input' is not defined
🌐
Reddit
reddit.com › r/learnpython › nameerror: name raw_input is not defined
r/learnpython on Reddit: NameError: name raw_input is not defined
April 2, 2021 -

I'm making an interactive menu and this problem apear and I don't know how to fix it, can soemeone please tell me how to fix it or tell me another approach for the error not to apear?

def funcion_uno():
print('Esta es la funcion uno')
def funcion_dos():
print('esta es la funcion dos')

if __name__ == '__main__':
salir = False
print('\033[1;32;40m Menu interactivo de Daft Punk')

mensaje = 'Ingrese la opcion deseada: '

menu = { 'a)': funcion_uno , 'b)': funcion_dos }

while not salir:
print('-'*len(mensaje))
print(mensaje)
for opcion, funcion in menu.iteritems():
print(opcion)
respuesta = raw_input('\nOpcion: ').lower()
salir = respueta == 'exit()'
else:
print('Hasta luego')

🌐
Quora
quora.com › Why-is-this-raw_input-detected-as-an-error-in-Python
Why is this 'raw_input' detected as an error in Python? - Quora
Answer (1 of 4): As noted by others, the raw_input() function in Python 2 and earlier was renamed to input(). Here’s the broader point, the old input() function in Python was a horrible misfeature. It’s semantics were understandable during the earliest days of Python, when it was intended ...
🌐
GitHub
github.com › LionSec › xerosploit › issues › 320
NameError: name 'raw_input' is not defined · Issue #320 · LionSec/xerosploit
August 13, 2022 - NameError: name 'raw_input' is not defined#320 · Copy link · asijdfiosja · opened · on Aug 13, 2022 · Issue body actions · NameError: name 'raw_input' is not defined · Reactions are currently unavailable · No one assigned · No labels · No labels · No projects ·
Author   asijdfiosja