googlefonts / diffenator2

A font comparison tool that will not stop until your fonts are exhaustively compared.
Apache License 2.0
46 stars 6 forks source link

Ninja not found #67

Closed meerfrau closed 1 year ago

meerfrau commented 1 year ago

I can't start diffenator due to this error:

  File "/usr/bin/diffenator2", line 5, in <module>
    from diffenator2.__main__ import main
  File "/usr/lib/python3.10/site-packages/diffenator2/__init__.py", line 4, in <module>
    from ninja.ninja_syntax import Writer
ModuleNotFoundError: No module named 'ninja'

Ninja however works well:

ninja /usr/
ninja /usr/bin/
ninja /usr/bin/ninja
ninja /usr/lib/
ninja /usr/lib/python3.10/
ninja /usr/lib/python3.10/site-packages/
ninja /usr/lib/python3.10/site-packages/ninja_syntax.py
m4rc1e commented 1 year ago

Have you tried installing the tool using a virtual environment?

python3 -m venv venv
source venv/bin/activate
pip install diffenator2

Try the above and see if it works for you. Also, what platform are you on?

meerfrau commented 1 year ago

I'm on ArchLinux and happy with just a single Python environment since 10 years. Pyproject.toml says ninja = "*"

May you please show me a dir tree of your ninja package?

m4rc1e commented 1 year ago
tree venv/lib/python3.10/site-packages/ninja
venv/lib/python3.10/site-packages/ninja
├── __init__.py
├── __main__.py
├── __pycache__
│   ├── __init__.cpython-310.pyc
│   ├── __main__.cpython-310.pyc
│   ├── _version.cpython-310.pyc
│   └── ninja_syntax.cpython-310.pyc
├── _version.py
├── data
│   └── bin
│       └── ninja
├── ninja_syntax.py
└── py.typed

3 directories, 10 files
meerfrau commented 1 year ago

This isn't ninja, this is https://pypi.org/project/ninja_syntax/ !

m4rc1e commented 1 year ago

That is not the correct pypi package. It's https://pypi.org/project/ninja/. Install that and you're good.