[Python] Jupyter Notebook Unable to Load Module mlwpy

Discussão em 'Python' iniciado por Stack, Julho 11, 2025.

  1. Stack

    Stack Membro Participativo

    I am completely new to programming in general and I do not understand very much about computers. A very similar question was asked previously, however I do not understand anything what was said.

    Background: I am attempting to run the first line of code as described in the book Machine Learning with Python for Everyone by Mark Fenner on the Jupyter browser notebook.

    This is the code:

    In [1]:

    from mlwpy import*

    %matplotlib inline


    Running the code returns this error:

    ModuleNotFoundError Traceback (most recent call last)
    <ipython-input-2-3489a3655c97> in <module>
    ----> 1 from mlwpy import *
    2 get_ipython().run_line_magic('matplotlib', 'inline')

    ModuleNotFoundError: No module named 'mlwpy'


    From my understanding we need a module mlwpy.py and this module can be found at this link thanks to the author of the book here; https://github.com/mfenner1/mlwpy_code/blob/master/mlwpy.py

    However, I do not understand what exactly I am supposed to do with this information. Someone mentioned putting the file in the same directory as our Jupyter notebook.

    This is where I am confused, what does that mean exactly? I copied and pasted the text onto Jupyter and then saved it as mlwpy.ipynb in the binder, however the problem continues to remain the same.

    If someone could explain step by step what I need to do, that would be greatly appreciated.

    Continue reading...

Compartilhe esta Página