Inconsistent versions of Voila, nbconvert and nbdev

Hi,

Sorry if this issue was clarified in other topic but I’ve been stuck trying to turn my Notebook into a Real App for more than a week already, I haven’t been able to find a solution here or anywhere else on the internet.

My environment:

  • MacOS Catalina 10.15.7
  • Paperspaces-Gradient Free GPU-1 (M4000)

The history:

  • I saved a copy of all notebooks and other files in fastbook/clean to storage/mynotebooks
  • I’m working now in 02_prodcution. ipynb
  • I run all cells without problems until the last one; the Voila installation.

The command:

!pip install voila --use-feature=2020-resolver
!jupyter serverextension enable voila --sys-prefix

The result:

ERROR: nbdev 1.1.5 requires nbconvert<6, but you’ll have nbconvert 6.0.7 which is incompatible.
Successfully installed nbconvert-6.0.7
Enabling: voila

  • Writing config: /opt/conda/envs/fastai/etc/jupyter
    • Validating…
      voila 0.2.4 OK

The problem

Despite the error message, I have Voila installed (there is a Voila icon in the top menu), but when I try to run the notebook in Voila, I receive an error message:

ERROR: Voila 0.2.4 requires nbconvert<7, >=6, but you have nbconvert 6.0.7 which is incompatible.

Therefore, I’m in a situation where Voila requires nbconvert >=6 while at the same time nbdev requires the same nbconvert to be <6.

I hope any of you can help me to identify what I’m doing wrong, and more importantly, how to fix it!

Many thanks in advance.
Luis

2 Likes

Ok, after 4 days without any response to my problem, I guess there is not an easy answer to my question.
Then, could any of the experts or moderators at least indicate which other sources could I consult in search for an answer, (other than fastai, voila and nbdev or nbconvert or stackoverrflow)?

Many thanks,
Luis

i am having the same problem here

@owura_Coder, good luck to you!
I recognise I’m new to this, but still I spent a week checking the documentation and the web and couldn’t find a solution.
After that I put the question here, in the fastai forum, but after a month I haven’t got any answer yet.
Not even from the moderators to let me know they looked into the issue and couldn’t find how to fix it; or at least to indicate where I could look for more info.
So, I decided to move forward and come back and try again from scratch once I finished with the whole book. Hopefully at that time I’ll be better prepared and able to find the solution by myself.

Disappointed with the support from the forum, but I guess it’s part of the challenge.

If you have any luck, please let me know.
Good coding,
Luis

1 Like

I am very sorry you had to go through all of that. fortunately, i have been able to find a way around this problem. This is what I did:

I then used the variables as the arguments in the vbox function. Hope this helps

2 Likes

Hi Richard,
many thanks for your help. It works now on the notebook but I keep getting and error message when I try to run it from Voila.

Error 404: Not found.
You’re requesting a page that doesn’t exist!

At least it’s a different error now.
Did your version work when you run it in Voila?

Thanks
Luis

1 Like

I am having similar error message when i try to use binder to convert the github repository of the notebook into a web app. I hope to find a solution soon. it seems hard to find similar problem on the internet with a solution.

Yes, it’s hard to find a solution even in this fastai forum.
I saw people working in the same environment (Paperspace Gradient) with the same notebook found at least a way around the Voila issue, but not even that worked for me.
I’ll keep searching and let’s get in touch if we find a fix!

Thanks a lot for your help.

Hey Luisenoz,

I was able to work around the deployment issue. I used heroku to deploy the app. You can fork the project in my github here: https://github.com/owuracoder/Bear-Classifier.git

This is the final project on heroku: https://findabear.herokuapp.com/

I hope this helps

1 Like

Congratulations Richard!

I see you gave up on Binder and changed to heroku.
It takes some time to load, (maybe because it was the first time), but it works beautifully.

The problem with mine is that it works well in the notebook but gives the error message when I try to launch it with Voila. So I won’t be able to run it in Heroku either.

Thanks again for your help, and by the way, Merry Christmas!

1 Like

I ended up here because I had the same issues you were having and now mine is working just fine in Binder. I used the work Richard did to solve most of my problems including how to trim down my notebook and what to include in requirements.txt. Here’s my github - https://github.com/j-alex-larrimore/ClassifierTest/tree/main

Two key issues I ran into that were a big deal -
#1 - Binder resets from URL to File every time. Make sure to switch back to URL otherwise you will get a 404 error.
#2 - Double check how you entered your Github URL. It took me a little to notice my notebook was in my original path and it broke everything since the notebook is referenced below. So, my repository name is “https://github.com/j-alex-larrimore/ClassifierTest/” not “https://github.com/j-alex-larrimore/ClassifierTest/blob/main/DeployClassifierApp.ipynb

And bam, my notebook works on Binder! Thanks for your help Richard!

3 Likes

Did you “comment out” the voila line

!pip install voila
!jupyter serverextension enable --sys-prefix voila 

or did you include that in your github notebook?

Neither. That’s included in the requirements.txt document which I made straight in Github, following Richard’s example.

Here is the entirety of my requirements.txt:

fastai
voila
ipywidgets

1 Like

Thanks so much Alex! this worked perfectly. Alas I am published

1 Like

Words cannot explain how much I love you right now <3 many virtual hugs, kisses, and drinks to you sir.

1 Like