# Notebook does not accept user input

**URL:** <https://discourse.jupyter.org/t/notebook-does-not-accept-user-input/25661>\
**Category:** discuss\
**Created:** [May 12, 2024, 3:10pm UTC](https://discourse.jupyter.org/t/notebook-does-not-accept-user-input/25661 "2024-05-12T15:10:56Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Okosa\_David](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/okosa_david/32/13374_2.png) [@Okosa\_David](https://discourse.jupyter.org/u/Okosa_David)\
**Post date:** [May 12, 2024, 3:10pm UTC](https://discourse.jupyter.org/t/notebook-does-not-accept-user-input/25661/1 "2024-05-12T15:10:56Z")

</div>

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 🙂

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

```

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [May 12, 2024, 3:57pm UTC](https://discourse.jupyter.org/t/notebook-does-not-accept-user-input/25661/2 "2024-05-12T15:57:13Z")

</div>

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](https://discourse.jupyter.org/t/getting-good-answers-to-your-questions/1825) to help you making such posts in the future.

---

<div class="post-metadata">

**Author:** ![Okosa\_David](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/okosa_david/32/13374_2.png) [@Okosa\_David](https://discourse.jupyter.org/u/Okosa_David)\
**Post date:** [May 14, 2024, 5:49pm UTC](https://discourse.jupyter.org/t/notebook-does-not-accept-user-input/25661/3 "2024-05-14T17:49:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [May 14, 2024, 6:19pm UTC](https://discourse.jupyter.org/t/notebook-does-not-accept-user-input/25661/4 "2024-05-14T18:19:59Z")

</div>

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](https://mybinder.org/v2/gh/fomightez/3Dscatter_plot_mod_playground-binder/main?urlpath=%2Ftree%2Findex.ipynb) 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](https://discourse.jupyter.org/t/unable-to-take-input-in-jupyter-notebook/25705).

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [May 16, 2024, 3:22am UTC](https://discourse.jupyter.org/t/notebook-does-not-accept-user-input/25661/5 "2024-05-16T03:22:49Z")

</div>

Oh, I wonder if it is related to [this open issue](https://github.com/jupyterlab/jupyterlab/issues/16320#issuecomment-2106170440)?

---

<div class="post-metadata">

**Author:** ![Okosa\_David](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/okosa_david/32/13374_2.png) [@Okosa\_David](https://discourse.jupyter.org/u/Okosa_David)\
**Post date:** [May 16, 2024, 3:56pm UTC](https://discourse.jupyter.org/t/notebook-does-not-accept-user-input/25661/6 "2024-05-16T15:56:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [May 16, 2024, 5:05pm UTC](https://discourse.jupyter.org/t/notebook-does-not-accept-user-input/25661/7 "2024-05-16T17:05:01Z")

</div>

> [@Okosa\_David](#):
>
> 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](https://blog.jupyter.org/jupyterlab-desktop-ui-modes-cec528d5e460). If that works, you can use `input()` there and it hopefully wouldn’t interfere with your pip-installed Jupyter.

---

<div class="post-metadata">

**Author:** ![krassowski](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/krassowski/32/1685_2.png) [@krassowski](https://discourse.jupyter.org/u/krassowski)\
**Post date:** [May 16, 2024, 5:08pm UTC](https://discourse.jupyter.org/t/notebook-does-not-accept-user-input/25661/8 "2024-05-16T17:08:16Z")

</div>

> [@Okosa\_David](#):
>
> 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

> 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.

---

<div class="post-metadata">

**Author:** ![krassowski](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/krassowski/32/1685_2.png) [@krassowski](https://discourse.jupyter.org/u/krassowski)\
**Post date:** [May 16, 2024, 5:09pm UTC](https://discourse.jupyter.org/t/notebook-does-not-accept-user-input/25661/9 "2024-05-16T17:09:41Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Okosa\_David](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/okosa_david/32/13374_2.png) [@Okosa\_David](https://discourse.jupyter.org/u/Okosa_David)\
**Post date:** [May 16, 2024, 5:30pm UTC](https://discourse.jupyter.org/t/notebook-does-not-accept-user-input/25661/10 "2024-05-16T17:30:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Okosa\_David](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/okosa_david/32/13374_2.png) [@Okosa\_David](https://discourse.jupyter.org/u/Okosa_David)\
**Post date:** [May 16, 2024, 5:37pm UTC](https://discourse.jupyter.org/t/notebook-does-not-accept-user-input/25661/11 "2024-05-16T17:37:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Okosa\_David](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/okosa_david/32/13374_2.png) [@Okosa\_David](https://discourse.jupyter.org/u/Okosa_David)\
**Post date:** [May 23, 2024, 12:28am UTC](https://discourse.jupyter.org/t/notebook-does-not-accept-user-input/25661/12 "2024-05-23T00:28:46Z")

</div>

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.
