Python Forum
ModuleNotFoundError: No module named '...'
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ModuleNotFoundError: No module named '...'
#1
Hello, I have two issues with this brand new project:

https://github.com/tlg-265/machinelearning.com-python

ISSUE 1:

when I run:

$ python scripts/train_model.py
I get:

Traceback (most recent call last):
  File "scripts/train_model.py", line 10, in <module>
    import machinelearningcom_python
ModuleNotFoundError: No module named 'machinelearningcom_python'
This is the line mentioned on the error above:

https://github.com/tlg-265/machinelearni...del.py#L10

ISSUE 2:

If I add a small comment on the top of the file like:

[Image: image.png]

Then, when trying to commit (through miniconda) I get the following failure with isort hook:

(base) D:\machinelearning.com-python>git commit -m 'test'
[WARNING] Unstaged files detected.
[INFO] Stashing unstaged files to C:\Users\anon/.cache\pre-commit\patch1570560215.
Trim Trailing Whitespace.................................................Passed
Check for added large files..............................................Passed
Check python ast.........................................................Passed
Check JSON...........................................(no files to check)Skipped
Check for merge conflicts................................................Passed
Check Xml............................................(no files to check)Skipped
Check Yaml...........................................(no files to check)Skipped
Debug Statements (Python)................................................Passed
Fix End of Files.........................................................Passed
Fix requirements.txt.................................(no files to check)Skipped
Mixed line ending........................................................Passed
Flake8...................................................................Passed
isort....................................................................Failed
hookid: isort

Files were modified by this hook. Additional output:

Fixing D:\machinelearning.com-python\scripts\train_model.py

[INFO] Restored changes from C:\Users\anon/.cache\pre-commit\patch1570560215.
Any idea on how to solve these two issues?

Thanks!
Reply
#2
first error looks like a dependency issue. try installing the module using pip or searching for the module online. The second is a github thing. I use github desktop, so i'm not sure how to stage changes in the CLI before committing them, but I know you need to before you can commit any changes.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  ModuleNotFoundError: No module named 'tkcalendar', Thonny, Windows 10 Edward_ 4 780 Apr-06-2025, 07:56 PM
Last Post: Edward_
  No module named 'importlib.metadata' EdVS 3 1,035 Jan-30-2025, 09:55 AM
Last Post: Larz60+
  ModuleNotFoundError: No module named 'athena_read' raman 2 1,304 Jul-01-2024, 07:52 AM
Last Post: Gribouillis
  no module named 'docx' when importing docx MaartenRo 1 5,611 Dec-31-2023, 11:21 AM
Last Post: deanhystad
  Problem with pymodbus - ModuleNotFoundError: No module named 'pymodbus.client.sync' stsxbel 2 31,151 Nov-02-2023, 08:20 AM
Last Post: South_east
  ModuleNotFoundError: No module named 'requests' Serg 18 10,020 Oct-29-2023, 11:33 PM
Last Post: Serg
  Resolving ImportError: No module named gdb (Python in C++) mandaxyz 3 4,509 Oct-04-2023, 02:43 PM
Last Post: mandaxyz
  ModuleNotFoundError: No module named 'PyPDF2' Benitta2525 1 3,848 Aug-07-2023, 05:32 AM
Last Post: DPaul
  ModuleNotFoundError: No module named 'eyed3' Wimpy_Wellington 2 3,213 Jul-10-2023, 03:37 AM
Last Post: Wimpy_Wellington
  How to fix this error: ModuleNotFoundError: No module named 'notears' yaoyao22 2 2,441 Jul-09-2023, 11:24 AM
Last Post: yaoyao22

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020