Notebook does not accept user input

I want to enter an input in my notebook, but anytime I run the code, the cell gets commented and turns blue, I’d appreciate any help, thanks :slight_smile:

#### a = int(input('Enter integer:'))
b = float(input('Enter float:'))
print('/n')
print('float * int = ', a*b)

Where is this happening? In what specific version of Jupyter and running specifically where? What type of kernel?
Is what you pasted what results after the cell “gets commented”?

We cannot help you without more details. And may not be able to help you if it is something imposed by the system you are on. Other than suggest you try that elsewhere, perhaps. But again, hard to tell without details first.
Please read & follow Getting good answers to your questions to help you making such posts in the future.

Hey, thanks for the reply
The problem is anytime I try to run an input function, the code does run but when I try to enter my input, the cell goes to markdown mode, gets commented and turns blue
This is my python version : Python 3.11.8 [MSC v.1937 64 bit (AMD64)]
This is my Jupyter notebook version : 7.1.0
I run a Python 3 (ipykernel)
yes that is the resulting code when i run the cell
I’m sorry, I’m a noobie

Thanks for adding these details.

Do you have any special browser plugins/extensions?
Have you tried it in a different browser?

I think we can at least test if it is your local system or browser. Does it happen if you open a session on a remote computer clicking here and try in a new notebook there?
That uses Jupyter Notebook 7.1.3, which isn’t the version you reported, however, is the version reported by the post that seems to be raising the same issue here.

Oh, I wonder if it is related to this open issue?

Thanks bro,
When using the remote jupyter notebook the code does run and I can enter an input and run the cell, It worked perfectly.
Could it be because I installed jupyter notebook from my cmd using a Pip install?
No I have no special extensions installed, I use the original chrome browser
The outlined problem is a little similar but not really identical
I might try reinstalling jupyter notebook with conda or mamba, would that help

At this point, it is such an odd issue, it might be interesting to see. However, don’t risk your system to chase this unless you want to.
Do you need input() working to continue?
And another option would be to install and see if it works in JupyterLab Desktop, see here. If that works, you can use input() there and it hopefully wouldn’t interfere with your pip-installed Jupyter.

Jupyter notebook version : 7.1.0

There was a bug in Jupyter Notebook 7.1.0 which was fixed in Jupyter Notebook 7.1.2. The lateste version is Notebook 7.2.0. Please upgrade your installation.

1 Like

Though I am not 100% sure this is related to the bug I am speaking of. Are you sure that the input box is focused when you are typing in?

1 Like

Yes I’m sure, It just doesn’t work
Oh, I’ll upgrade it right away, Thanks a lot

Ok I’d like to continue pursuing the issue maybe I’ll even try it on a new pc
I’ll install jupyter lab and check if the issue persists and be sure to update you if there are any changes.
Thanks a ton, I’ve learned a lot from trying to fix this issue. I’m grateful for all the assistance and quick replies
Thanks again boss man

1 Like

Hey boss, as I promised I got back to you,
I updated the Jupyter notebook as @krassowski said it still didn’t work
but when I installed Jupyter lab from pip and ran the code it executed perfectly with no errors, commenting or markdown mode
I bought a new pc so I’ll try installing the exact notebook version to see if anything changes when I run the input() function.
I’ll make sure to get back to you again.