Closed PythonCHB closed 1 year ago
NOTE: this example is with a bare-bones environment -- but I'm had teh same issue using it with other environments, e.g, with pytype (also broken:-( )
The pytype problem is claiming that no "ninja" module exists when trying to run python -m ninja
(this attempts to import ninja as a python package, then run its __main__
entrypoint.
This error is reporting that ninja ran successfully, but the purpose of ninja is to load a file called build.ninja and evaluate it as a kind of Makefile. And that file didn't exist, so it had nothing to do.
$ ninja
ninja: error: loading 'build.ninja': No such file or directory
$ ninja -f custom_rules.ninja
ninja: error: loading 'custom_rules.ninja': No such file or directory
$ python myscript.py
python: can't open file '/tmp/myscript.py': [Errno 2] No such file or directory
It's all the same class of error -- but neither python nor ninja is broken just because the file it tries to load doesn't exist.
(But ninja has a default file it will load if you don't pass -f
to it. Python doesn't have a default file, it just opens an interactive REPL.)
My mistake -- pardon my ignorance.
Closing this now.
Solution to issue cannot be found in the documentation.
Issue
Installing ninja does not result in a functional ninja command:
NOTE: this example is with a bare-bones environment -- but I'm had teh same issue using it with other environments, e.g, with pytype (also broken:-( )
Installed packages
Environment info