Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError on windows #185

Open
calmymail opened this issue Jul 24, 2022 · 3 comments
Open

ImportError on windows #185

calmymail opened this issue Jul 24, 2022 · 3 comments

Comments

@calmymail
Copy link

I successfully installed smop. But when I run with command in poweshell:

smop> python main.py -h

I get the error:

Traceback (most recent call last):
File "G:\Teaching-CAL\Codes-Teaching\000 CFD\GITHUB\smop\smop\main.py", line 15, in
from . import options
ImportError: attempted relative import with no known parent package

Suggestions?

@berlinpolin
Copy link

I remove the relative import.

For example,
from . import options -> import options
or
from . node import extend,exceptions -> from node import extend,exceptions

The error can be solved. But I have no ideal how to get the correct output python file

@calmymail
Copy link
Author

calmymail commented Aug 3, 2022 via email

@berlinpolin
Copy link

berlinpolin commented Aug 4, 2022

I use python 3.9.13. Which version do you use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants