No module named 'examples.linear_elasticity'

Hello I am following the Sfepy example and I can not import the subfolder even though I am at the right directory and the subfolder includes __init__.py How can I import it thanks from __future__ import absolute_import from examples.linear_elasticity.its2D_1 import *
ModuleNotFoundError Traceback (most recent call last) <ipython-input-47-e1bcc20cd52d> in <module>() ----> 1 from examples.linear_elasticity import *
ModuleNotFoundError: No module named 'examples.linear_elasticity'

Hi,
by "the right directory" you mean the top-level sfepy directory, that is the one containing "examples/"?
You are following the tutorial [1]?
r. [1] http://sfepy.org/doc-devel/primer.html
On 4/13/19 9:50 PM, Zelda Grey wrote:
Hello I am following the Sfepy example and I can not import the subfolder even though I am at the right directory and the subfolder includes __init__.py How can I import it thanks from __future__ import absolute_import from examples.linear_elasticity.its2D_1 import *
ModuleNotFoundError Traceback (most recent call last) <ipython-input-47-e1bcc20cd52d> in <module>() ----> 1 from examples.linear_elasticity import *
ModuleNotFoundError: No module named 'examples.linear_elasticity'
SfePy mailing list -- sfepy@python.org To unsubscribe send an email to sfepy-leave@python.org https://mail.python.org/mailman3/lists/sfepy.python.org/
participants (2)
-
Robert Cimrman
-
Zelda Grey