vemonet / rdflib-endpoint

💫 Deploy SPARQL endpoints from RDFLib Graphs to serve RDF files, machine learning models, or any other logic implemented in Python
https://pypi.org/project/rdflib-endpoint
MIT License
75 stars 18 forks source link

Missing dependencies `uvicorn` and `click` #20

Closed gwpl closed 9 months ago

gwpl commented 10 months ago

When trying out project via :

pipx install git+https://github.com/vemonet/rdflib-endpoint.git

I've encountered problems with missing click and later uvicorn modules:

Traceback (most recent call last):
  File "/home/user/.local/bin/rdflib-endpoint", line 5, in <module>
    from rdflib_endpoint.__main__ import cli
  File "/home/user/.local/pipx/venvs/rdflib-endpoint/lib/python3.11/site-packages/rdflib_endpoint/__main__.py", line 5, in <module>
    import click
ModuleNotFoundError: No module named 'click'

I've injected them manually into pipx environment:

pipx inject rdflib-endpoint click uvicorn

However, maybe it's possible to add them to your dependencies so things just work.

vemonet commented 9 months ago

Hi @gwpl in the README it is explained you need to add the web and cli optional dependencies to get uvicorn and click

It is done this way because python does not handle dependencies well, and the less you install dependencies the better it is (less chances of conflicts)

Some people might want to use this package without the CLI, or with another asgi framework, so they are made optional

You can install what you need with:

pipx install rdflib-endpoint[web,cli]
gwpl commented 9 months ago

Thank you for sharing! Now I know rationale! Python is not my main language and I have tons of bad experiences with Pyhton conflicting dependencies hell in past... hoped that pipx/venv improved situation a bit... Thanks for RDF code!