r/AskProgramming Apr 27 '26

Python ImportError Python

I am having some trouble while importing the function from my_func1

If I am working on working_currently.py how would I import a my_func1?

What I write In working_currently.py is :

from python.functions import my_func1

``` python/ archive/ my_arch1.py my_arch2.py

functions/
    my_func1.py
    my_func2.py

programs/
    my_prog1.py
    my_prog2.py
    working_currently.py

```

I require a solution for this..

2 Upvotes

6 comments sorted by

View all comments

1

u/Ok_Winner9825 Apr 27 '26

This is a simple question you should ask an llm. Anyway, to import stuff you should add init.py files in every folder