SU2 build from source on WSL (invalid syntax in mesonmain.py)
milowangjinhong opened this issue · 1 comments
Hi,
I am new to SU2 and I am trying to install and build from the source code of SU2 on WSL Ubuntu 16.04. However, I kept getting errors in the meson build process on the website. It might be something stupid but I would appreciate it if anyone could help me with it.
I first cloned the GitHub repo to the local directory by:
git clone https://github.com/su2code/SU2.git
then I run the meson file
./meson.py build
The code seems to be running for a while, downloading something (I assume they are prerequisites) in subprojects/ folder. Then I got this error in the following:
$ ./meson.py ./build
......
......
Checking connectivity... done.
Submodule path 'externals/mel': checked out '2484cd3258ef800a10e361016cb341834ee7930b'
ninja executable not found. Building ...
bootstrapping ninja...
warning: A compatible version of re2c (>= 0.11.3) was not found; changes to src/*.in.cc will not affect your build.
wrote build.ninja.
bootstrap complete. rebuilding...
[29/29] LINK ninja
Traceback (most recent call last):
File "./meson.py", line 83, in
from mesonbuild import mesonmain
File "/mnt/c/Users/NAME/Work/Code/SU2/externals/meson/mesonbuild/mesonmain.py", line 191
mlog.error(f'Error in {script_name} helper script:')
^
SyntaxError: invalid syntax
I am not sure what is happening here. Could anyone please help me? Thank you very much.
Thanks, guys. I just figured it out. It is the Python version's issue. I was using Python 3.5 but Meson requires at least Python 3.7. Apologies for the confusion and perhaps you can make a note somewhere in the documentation in case any newcomers like me have the same issue.