Installed Jupyter does not give any output

Hi,
I just installed jupyter (both notebook and lab) to be able to do further analysis in the guided projects. I opened the *.ipynb file, but when I run the cells, there is no output at all. Ex: df.head() will no give any output.
What am I doing wrong? I tried to find a solution on the internet but I just found more people with the same problem and no solution to it.
Also, why do you recommend using jupyter? I am new to it but I hate it already. It is not better something like Rstudio for R? IDLE? No idea :S I just hate jupyter :wink:
Thanks!!

Hi @ncirauqu,

I installed Anaconda, with Python and Jupyter already included, and use Jupyter from there without problems.

I have all of them installed, and all work, but no output. I do not know if it could be problems with different versions of python. I have python 2.7 as default. I did something I found on the internet and now I have the option in jupyter to select an environment of python3 as kernel (if I understood right). But still, nothing, no change.
Actually, I am getting errors when I run jupyter:
Uncaught exception GET /api/kernels/…
No idea :frowning:

Hello @ncirauqu,

For anyone to better assist you, need more details about the OS(Windows, Linux/Mac) you are using and how you installed python.
If your default python is 2.7, I’m assuming you’re on Mac/Linux?
Also, it would be helpful if you can specify if you used any virtual environments?


Even though you can select Python 3 in Jupyter, running !python --version in a code cell will reveal the underlying python version.


To keep the integrity of different python versions, I recommend this excellent article on why it’s important to have virtual environments.
If you already know about it, you can skip it.


If it’s your own python installation:
I had a similar problem with pip installations when I first began (don’t remember the exact one!) that led to module version conflicts, and with no clear solution on the horizon after much digging, decided to wipe it all and start afresh.

If this is all taking too much time without any end result, it would be better to obliviate any python installations and start afresh.


If it’s Anaconda:
With Anaconda, you shouldn’t be facing problems as python/Jupyter comes bundled with the distribution (note: conda also allows you to create virtual environments to isolate python installations)

1 Like

Yes, I also did so: uninstalled my previously installed python to avoid version conflicts and only then installed Anaconda and worked from there. Probably this is the reason why I had no problems with Jupyter :blush:

1 Like

Hi, thanks!
The problem is that all about virtual environments and stuff is so complicated for me. I read your article and more, but clearly my brain is not developed enough to understand that. And now I am not even able to uninstall jupyter anyhow. So, I give up :frowning:
Thanks anyhow for the advices.

1 Like

I managed doing the stupid way, yupiii!!! I just removed by hand everything called jupyter on my laptop. Then I created one more python environment (one day I will need to learn how to remove the old ones hehe), and then, once activated, installed with PIP everything: jupyter, pandas,… It seems to be working fine. Cool!!

So, in case other people has the same problem. This are the steps that I remember to have followed:
First, I installed pyenv and virtualenv somehow. I think this way:

  1. brew install pyenv
  2. pip install virtualenv.

Then:

  1. Go somewhere where you want to create a folder for your virtual environments (path)
  2. mkdir myenv
  3. source myenv/bin/activate (from other folder: source path/myenv/bin/activate)
  4. cd myenv
  5. python3 -m venv myenv 3 set python3 as version of myenv
  6. pip install pandas, pip install ipython, pip install numpy, …
  7. pip install jupyterlab
    Then you run jupyter-lab, and you select the kernel python 3.

Hope this helps somebody :slight_smile: