[Python] I get an error like this: ModuleNotFoundError: No module named 'mymodule' What do I...

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

  1. Stack

    Stack Membro Participativo

    I have my own python module in a custom location here:

    /mydata/python/mylibrary/mymodule.py for linux, or for Windows: C:\mydata\python\mylibrary\mymodule.py

    There are no other files or folders in the directory “mylibrary”.

    When I try and import this module into a python program with the statement:

    import mymodule

    I get an error like this:

    ModuleNotFoundError: No module named 'mymodule'

    What do I need to do to make this module import work?

    need help, tried everything

    Continue reading...

Compartilhe esta Página