Pages

Showing posts with label jupyter-notebook. Show all posts
Showing posts with label jupyter-notebook. Show all posts

Using Jupyter notebook in Apple M1: Error 2850 Segmentation fault

 In the live video stream by George Hotz titled, "Programming | tinygrad: neural engine on M1? | Science & Technology | Apple M1 | Part4"

He almost spent 1 hour to find out what causes the error and debugging.

He uses a number of installations, cloning repositories, debugging, installations, etc.

Here is the solution he found.

Install faulthandler as follo.

pip3 install faulthandler  

(if your python version is higher than 3.3, it is inbuilt)

The error is in the use_app_nope package.

Just comment out it. The problem solved.

For more detail, you can watch the full video. 

Or you may watch the video at https://youtu.be/mwmke957ki4?t=2929








Jupyter-notebook not running after Ubuntu upgrade

$ jupyter-notebook 

Traceback (most recent call last):
  File "/usr/local/bin/jupyter-notebook", line 7, in <module>
    from notebook.notebookapp import main
ModuleNotFoundError: No module named 'notebook'

$pip install jupyter --user installed the jupyter-note book.

But I want python3 version.
I tried to install jupyter using following command.

$ pip3 install jupyter --user

Traceback (most recent call last):
  File "/usr/local/bin/pip3", line 7, in <module>
    from pip._internal import main
ModuleNotFoundError: No module named 'pip._internal'

To solve this problem do the following.
Remove the installed jupyter using:

$sudo apt-get uninstall jupyter (and hit 'y' to confirm)

or,

$pip uninstall jupyter

and update using:

$sudo apt-get update

Now do the following:

$sudo apt-get install jupyter-notebook

Now, you can open the jupyter-notebook.

Everything you need to know about Jupyter Notebook

To start a notebook 
In terminal, run

jupyter-notebook 

Now, the notebook will be opened in your default browser.

To change the current line as comment

Ctrl + /   (this will change the current line in to a comment. To convert multiple lines of code in to a comment, select the lines that you want to convert and then hit Ctrl + /

Running different programs in Jupyter-Notebook

You can run Bash comments in jupyter-notebook. In any cell, type %%bash then that shell can be used to to bash comments. Similarly, other programming languages also can be run. A detailed post will be written on this topic.   

Jupyter Notebook error: AttributeError: type object 'IOLoop' has no attribute 'initialized'

AttributeError: type object 'IOLoop' has no attribute 'initialized'

This error may be due to the tornado==5.0* versions. Using Tornado 4.5.3 solves the problem.

To do this, try

pip3 uninstall tornado
pip3 install tornado==4.5.3
This solved my problem. Comment if this is useful to you.


You may be interested in these posts

Error in image file conversion: convert-im6.q16: not authorized `test.eps' @ error/constitute.c/WriteImage/1037.

This error is because of the vulnerability. This allows remote execution of code using image formats. So, some Linux distributions by defaul...