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
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/…
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
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)
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
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
Thanks anyhow for the advices.
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:
- brew install pyenv
- pip install virtualenv.
- Go somewhere where you want to create a folder for your virtual environments (path)
- mkdir myenv
- source myenv/bin/activate (from other folder: source path/myenv/bin/activate)
- cd myenv
- python3 -m venv myenv 3 set python3 as version of myenv
- pip install pandas, pip install ipython, pip install numpy, …
- pip install jupyterlab
Then you run jupyter-lab, and you select the kernel python 3.
Hope this helps somebody