notebook icon indicating copy to clipboard operation
notebook copied to clipboard

Jupyter Python3 kernel incomplete and out of date in snap for Ubuntu-21.10

Open vobine opened this issue 3 years ago • 3 comments
trafficstars

I have a standard snap installation of Jupyter on Ubuntu-21.10. There are problems:

  • Jupyter uses its own Python installation, which is Python-3.7, but Python-3.9.7 is installed on the underlying Ubuntu and the latest on python.org is 3.10.4.
  • The Jupyter python installation does not include matplotlib or numpy. There are probably more, but those are the ones preventing my notebooks from running.

How to deal with this? My notebooks need numpy and matplotlib. Is there a way to use them with the snap installation of Jupyter or do I need to install it differently (e.g., conda)?

Help!

vobine avatar Apr 03 '22 22:04 vobine

I'd be happy to do it myself, but I need to find the Snap source. I've searched but found nothing. Who owns it, Ubuntu, or you folks, or somebody else?

vobine avatar Apr 10 '22 18:04 vobine

Yes, use conda. Create an Environment, and install all the libraries in that environment, numpy, Matplotlib and jupyter notebook, then activate it using conda activate env, after that type jupyter notebook and you are all set!

Example- conda create -n myenv python=3.10.4 jupyter numpy (to create a custom environment)

Now, activate it using conda activate (path of myenv)

Now all you have to do is type "jupyter notebook" while environment is activated

after you are done press ctrl+c to close the notebook and type conda deactivate to deactivate the environment!

you can create multiple custom environments like that.

parthmahe avatar May 12 '22 05:05 parthmahe

Thank you, @parthmahe, for suggesting a workaround. I've used conda before in other contexts.

However, it's a workaround and not a fix. Project Jupyter provides a snap package that does not work. If it can't be made to work, shouldn't it be withdrawn? As it stands, I'm sure I'm not the only one who's tripped over this.

vobine avatar Jul 03 '22 19:07 vobine