SyntaxError encountered upon import
Closed this issue · 2 comments
isaacWpark commented
What happened?
after installing the most recent version of xwrf using pip, it failed to import.
Minimal Complete Verifiable Example
import xwrf
Relevant log output
Traceback (most recent call last):
File "C:\Users\isaac\anaconda3\envs\pydaymet\lib\site-packages\IPython\core\interactiveshell.py", line 3457, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "C:\Users\isaac\AppData\Local\Temp/ipykernel_31480/3638888779.py", line 1, in <module>
import xwrf
File "C:\Users\isaac\anaconda3\envs\pydaymet\lib\site-packages\xwrf\__init__.py", line 8, in <module>
from .accessors import WRFDataArrayAccessor, WRFDatasetAccessor
File "C:\Users\isaac\anaconda3\envs\pydaymet\lib\site-packages\xwrf\accessors.py", line 177
if this_staggered_dims := set(var_data.dims).intersection(staggered_dims):
^
SyntaxError: invalid syntax
Environment
unable to import
Anything else we need to know?
No response
jthielen commented
Is there a chance that you are using a version of Python older than 3.8? The :=
operator was added in Python 3.8, which is the minimum version supported by xwrf (and much of the present Scientific Python stack).
lpilz commented
Closing this issue due to inactivity and the probable cause being a wontfix
.