I'm pretty new at this so thanks for the patience. I was trying to import some libraries like matplotlib into a Jupiter Notebook file and I would get an error claiming that "there is not module named matplotlib". After having a difficult time installing it through the terminal (every time I used 'pip install matplotlib' the command would terminate due to some error), I tried opening the notebook file through the Anaconda navigator (opening the anaconda navigator, clicking on the Jupyter Notebook, which is slower and less convenient). However, importing actually worked with this method. It was the exact same file. The only variation was the way I opened Jupyter Notebook.
My question is why does this happen? What is going on that I don't know? It seems like an important piece of information to understanding how file systems work but I can't figure it out. Also, how can I fix this?
Related
I am trying to setup Scala on Jupyter Notebook and I have been following this Github page to do the setup https://github.com/vericast/spylon-kernel
But when I used the spylon kernel in Jupyter Notebook. After executing the cell, it just frozen with this message Intitializing Scala interpreter .... I waited for an hour and it still wont show anything other than that message.
I tried to look for solutions on Stackoverflow and Github but still couldnt solve this issue. I am wondering does anyone here know how to solve it? Or have any other alternatives for me to use Scala on Jupyter Notebook.
Check the command prompt of jupyter note-book and see if there is any error.
normally this happens when there is mismatch between spark version and python in anaconda
spylon-kernel hasn't been updated in several years and it does not work properly these days. Instead, its much better to use almond - "A Scala kernel for Jupyter".
I had to update my spyder to version 4.1.1 so I updated Spyder to that specific version.
After updating and rebooting the spyder in my anaconda navigator would not start
Then I opened anaconda promopt and typed the commander spyder --reset which resetted
Then it wouldnt restart without an enormous page long of error. I rebooted my computer again.
Now I can open Spyder 4.1.1. but my import matplotlib as plt command won't import the desired library.
I checked in my current enviroment whether the matplotlib was present (It was gone for some odd reason). so I tried installing that package using the navigator (Tab "Enviroments" and then looking for it with the fuzzy search )
When I hit install, I can see in the bottom of the navigator that it is "installing" but then I get an error message stating: Multiple Errors Encountered
When I press "Learn more" it directs me to another website
I am very lost at the moment, it shouldnt be that hard to update spyder to a newer version?
Would anybody be able to help me out?
A small update: I have fully removed my python/anaconda enviroment and reinstalled it from a blank state. This gave me the solution. An 4 hour-ish struggle has come to an end. I do am curious what steps I could have taken in this ordeal without not having to fully reinstall Anaconda.
I recently upgraded to MacOS Catalina to take advantage of various new features/improvements. Soon after installation, I noticed that a question grey mark appeared over the Anaconda icon in my applications. Additionally, my Anaconda files have seemingly been migrated to the "Relocated Items" folder now on my desktop.
I am not sure exactly how to deal with this. I have tried clicking the Anaconda icon with the question mark to launch it, but this fails. I have also attempted locating my Jupyter notebooks in the relocated items file but have not been able to do so successfully.
My question is what do I need to do to fix this problem to restore normal functionality back? Do I need to reinstall Anaconda? Will this new installation have my old Jupyter notebooks?
From a little reading online I have found that Apple says that no files should be deleted; therefore, in theory, there should be no loss of data from the upgrade. I am just not sure how I can restore access to these Jupyter notebooks.
Not sure if anyone else has experienced a similar problem. Any help or general guidance would be greatly appreciated.
Thanks.
Answer: As I just found out, Anaconda rolled out a new update to address this issue. I went to their website here and just downloaded a fresh installation of the latest version of Anaconda. This worked great and completely fixed the issue. I can now access all of my pervious Jupyter notebooks.
I am using Amazon EC2 AMI deep learning.
how can I revoke permission of uploading a file in jupyter notebook? Is there any way I can deny user from uploading any new files from their local machine?
This is an open issue on the jupyter github:
https://github.com/jupyter/jupyter/issues/293
A way to disable downloading is described here:
https://ujjwalbhardwaj.me/post/disable-download-button-on-the-sagemaker-jupyter-notebook
I haven't tested it myself, but I can image that overriding the files_handler_class with None in the latter example could also prevent uploads.
c.ContentsManager.files_handler_class = None
About three years after Logiza DevOps' answer: this is still an open issue on GitHub, albeit a different one (#7451). The discussion revolves around making uploads extension-based so that they can be disabled. The problem is that it is not sufficient to "make the Upload button disappear" because it is also possible to upload a file by simply dragging and dropping it over the notebook's File manager. In short, this is complicated :-(
What's more: even if you could block file uploads, the user can still edit notebooks and other files through the Web GUI, so it's possible for instance to start some long-running CPU-intensive calculations on your notebook server. I think you have no other choice but to trust your notebook users...
Slightly off-topic: as regards disabling downloads, there is now a Jupyter extension-based solution:
jupyter labextension disable #jupyterlab/docmanager-extension:download
jupyter labextension disable #jupyterlab/filebrowser-extension:download
pip3 uninstall -y nbconvert
The nbconvert removal is necessary to prevent notebook conversion to PDF for instance.
I don't understand where to get this (see the link) http://forumbilder.se/H8BSE/skarmavbild-2018-10-01-kl-10-20-25
I thought that we used jupyter Notebook in IDLE/shell (I have downloaded anaconda) but this seems to be something different?
Regards,
UPDATE: ok, I found it, needed to type jupyter notebook in the terminal, and then the broweser came up. Thanks anyway