NameError: name 'UnitSquareMesh' is not defined #3663
Replies: 1 comment
-
This indicates that you have VS Code set to use homebrew Python directly rather than using the Python in the Firedrake venv: Documentation on how to set the interpreter is at: https://code.visualstudio.com/docs/python/environments#_manually-specify-an-interpreter |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I run my code in Vscode,
from firedrake import *
mesh = UnitSquareMesh(32, 32)
V = FunctionSpace(mesh, 'CG', 1)
(x, y) = SpatialCoordinate(mesh)
"from firedrake import *" is fine , but the error output is :firedrake) (base) mark@markdeAir ~ % /opt/homebrew/bin/python3 "/Users/mark/# test.py"
Traceback (most recent call last):
File "/Users/mark/# test.py", line 2, in
mesh = UnitSquareMesh(32, 32)
^^^^^^^^^^^^^^
NameError: name 'UnitSquareMesh' is not defined
(firedrake) (base) mark@markdeAir ~ %
How does that happen?
Beta Was this translation helpful? Give feedback.
All reactions