meson 0.45.0 install with pip3 on Windows 10 (Python 3.6.2 )
>python meson.py
Traceback (most recent call last):
File "meson.py", line 17, in
from mesonbuild import mesonmain, mesonlib
File "C:\Users\x\AppData\Local\Programs\Python\Python36\lib\site-packages\mesonbuild\mesonmain.py", line 18, in
from . import environment, interpreter, mesonlib
File "C:\Users\x\AppData\Local\Programs\Python\Python36\lib\site-packages\mesonbuild\environment.py", line 17, in
from . import coredata
File "C:\Users\x\AppData\Local\Programs\Python\Python36\lib\site-packages\mesonbuild\coredata.py", line 20, in
from .mesonlib import MesonException
File "C:\Users\x\AppData\Local\Programs\Python\Python36\lib\site-packages\mesonbuild\mesonlib.py", line 78, in
meson_command = python_command + [detect_meson_py_location()]
File "C:\Users\x\AppData\Local\Programs\Python\Python36\lib\site-packages\mesonbuild\mesonlib.py", line 70, in detect_meson_py_location
raise RuntimeError('Could not determine how to run Meson. Please file a bug with details.')
RuntimeError: Could not determine how to run Meson. Please file a bug with details.
On Windows you should not run pip installed binaries like that. Instead you should do meson <options>. I just tested this and it seems to work on Windows 10 and Python 3.6.4. Can you test that?
>pip3 install meson
Requirement already satisfied: meson in c:\users\xappdata\local\programs\python\python36\lib\site-packages
>meson
'meson' is not recognized as an internal or external command, operable program or batch file.
>meson.py
C:\Users\x\AppData\Local\Programs\Python\Python36\Scripts\meson.py \
Run C:\Users\x\AppData\Local\Programs\Python\Python36\Scripts\meson.py --help for more information.
You have to ensure that the py launcher is installed with your installation. I don't know if that happens by default.
I think we should consider shipping a meson.bat file that contains C:\path\to\python C:\path\to\meson.py %*, and put it in PATH. That will make it easier for users.
This is a duplicate of #1877.
Duplicate of https://github.com/mesonbuild/meson/issues/1877
Most helpful comment
You have to ensure that the
pylauncher is installed with your installation. I don't know if that happens by default.I think we should consider shipping a
meson.batfile that containsC:\path\to\python C:\path\to\meson.py %*, and put it inPATH. That will make it easier for users.