Skip to content

cannot import module in vscode #810

Locked Answered by drunkwcodes
ivyy asked this question in Q&A
Discussion options

You must be logged in to vote

You may make a directory like this:

.
├── my_package
│   ├── __init__.mojo
│   ├── mymodule.mojo
│   └── main.mojo

And use relative import in main.mojo:
from .mymodule import MyPair

However I think your approach should work.
It can be an issue.

Replies: 1 comment 1 reply

Comment options

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

Answer selected by ivyy
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