2

I am having a similar issue to this problem.

I want to download Meson for Windows and used the following command:

pip3 install meson

This installs in my site-packages folder, specifically c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages\mesonbuild

However, running meson or python3 meson.py results in an error:

'meson' is not recognized as an internal or external command, operable program or batch file.

When looking at the mesonbuild directory within site-packages, I seem to be missing the meson or meson.py file. Has anybody ever come across this issue before?

user14382107
  • 21
  • 1
  • 2

2 Answers2

0

After opening up Visual Studio, and looking at the installed Python packages in my environment, I noticed this interesting information window above the list of my Python packages:

Due to new security restrictions, installing from the internet may not work on this version of Python.

After seeing this, I decided to install Meson through the website's MSI installer. Indeed, after trying to download the installer, Windows threw up all kinds of security warnings and "are you sure you want to do this" notifications before I convinced Windows that I really did want to install Meson.

I just wanted to share this with anybody that might have the same issues. The MSI installer worked for my needs.

user14382107
  • 21
  • 1
  • 2
0

Try the following :

python3 -m mesonbuild.mesonmain build

Meson pip package contains meson and mesonbuild modules. The meson module serves as Python entry point, which, during an initial execution of setup.py, associates mesonbuild.mesonmain:main with command line name 'meson'. (Explain Python entry points?). To invoke meson via python3 use python3 -m mesonbuild.mesonmain build, which writes build config into 'build' directory (provided that there is meson.build file in the current directory.) There is no such file 'meson.py' in mesonbuild module and meson module does not contain any Python code.

  • 4
    If you want to answer then do not post rethorical question in the answer space. Be more affirmative and remove question marks inside an answer. – Steve Feb 13 '21 at 10:42
  • 5
    Why do you propose this experiment? What are the possible results you foresee? For each of them, what would be the solution? – Yunnosch Feb 13 '21 at 10:53