Skip to content

import own module #62

Answered by pawamoy
RandomCollection asked this question in Q&A
Sep 17, 2024 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

Hi!

You shouldn't try to import from src. Please see docs for the flat vs. src layouts here: https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/.

If your project is installed in the current venv (whatever the layout it uses), you should be able to import with from module import func.

Let me know if that helps 🙂

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by RandomCollection
Comment options

You must be logged in to vote
1 reply
@pawamoy
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants