Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why my code does'nt execute on ipython notebook?

I am totally new to jupyter notebook and I was trying to run a simple code and its not working.enter image description here

I typed print (1) and hit ctrl + enter, and then that asterisk mark appeared and thats pretty much it. there is a blinking "connected" in the console as well.

Command window looks like this: enter image description here

Any tip regarding this would be highly appreciated. Thank you

like image 437
cool_kid Avatar asked Dec 24 '22 04:12

cool_kid


2 Answers

yes, as Teemo pointed out all I had to do was use this,

C:\Python27\Scripts>jupyter notebook --port=8889

instead of,

C:\Python27\Scripts>jupyter notebook.

port 8889 , worked like a charm :)

like image 134
cool_kid Avatar answered Dec 26 '22 18:12

cool_kid


using Jupyter on a VM, this was also for me the solution. Additionally, you can create a config file with:

jupyter notebook --generate-config

and search In your jupyter_notebook_config.py file for c.NotebookApp.port = 8888 (and change the port to 8889)

so you don't have to manually add the port every time jupyter is called.

like image 31
kwant Avatar answered Dec 26 '22 19:12

kwant