Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unreadable Notebook - Unsupported nbformat version 4 on windows

I finally was able to install ipython on my Windows 7 PC and it runs without any errors. The problem is that I used to code in ipython but in MAC. Now that I am trying to upload my previous notebooks I receive the following error:

Unreadable Notebook: MyFile.ipynb  Unsupported nbformat version 4

I found this answer for my question but unfortunately that is not for windows and did not resolve my problem. It is worth to mention:

ipython --version

produces: 2.3.1

Any help or comment on this is much appreciated.

Thanks

like image 850
ahajib Avatar asked Aug 31 '15 20:08

ahajib


2 Answers

It took me a while to figure this out but I got the first lead from user "cel". I used to have multiple versions of python (2.7 and 3.4). I removed python 3.4 because it's not compatible with spark yet. Next, I had to remove WinPython3.4 and replace it with WinPython2.7 so it can integrate with python 2.7 installed on my PC. Finally, I installed python 2.7.9 and set the C:/Python27/Script as a part of system environment variable. After doing all this I ran the following commands:

pip uninstall ipython

This helped me to remove older version of ipython. Then:

pip install ipython

This installed the latest version of ipython on my windows pc. Finally:

pip install notebook --upgrade

To upgrade notebook to latest version. Right now, ipython os installed and and should work fine doing this:

ipython notebook

Had no problem importing my previous .ipynb after all of the above.

Good luck to you all.

like image 174
ahajib Avatar answered Oct 24 '22 18:10

ahajib


I have the same problem on Linux. Simply doing:

sudo pip install notebook --upgrade

worked for me. I have python 3.4 and 2.7 and unlike the answer by nimafl, there was no need for me to remove one them or to first uninstall ipython. A simple upgrade did the trick. Now instead of version 2.3.1 I have version 4.0.3 of ipython.

like image 20
patapouf_ai Avatar answered Oct 24 '22 18:10

patapouf_ai