Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish dependencies #11

Open
cmclaughlin opened this issue Feb 9, 2024 · 0 comments
Open

Publish dependencies #11

cmclaughlin opened this issue Feb 9, 2024 · 0 comments

Comments

@cmclaughlin
Copy link

Hi,

I'm just getting started trying out this library. Thank you, it looks great...

I'm following these docs:

https://graphtik.readthedocs.io/en/latest/operations.html

So I started by installing from pypi...

pip install graphtik==10.5.0

Following the tutorial I got an error that numpy isn't installed...

>>> from operator import add
>>> from graphtik import operation
>>> add_op = operation(add, needs=['a', 'b'], provides=['a_plus_b'])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/cmclaughlin-local/.pyenv/versions/raven-3.11.2/lib/python3.11/site-packages/graphtik/fnop.py", line 1128, in operation
    op = FnOp(**kw)
         ^^^^^^^^^^
  File "/Users/cmclaughlin-local/.pyenv/versions/raven-3.11.2/lib/python3.11/site-packages/graphtik/fnop.py", line 357, in __init__
    from .jsonpointer import jsonp_path
  File "/Users/cmclaughlin-local/.pyenv/versions/raven-3.11.2/lib/python3.11/site-packages/graphtik/jsonpointer.py", line 36, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'

After installing numpy, I got an error that pandas wasn't installed...

>>> from operator import add
>>> from graphtik import operation
>>> add_op = operation(add, needs=['a', 'b'], provides=['a_plus_b'])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/cmclaughlin-local/.pyenv/versions/raven-3.11.2/lib/python3.11/site-packages/graphtik/fnop.py", line 1128, in operation
    op = FnOp(**kw)
         ^^^^^^^^^^
  File "/Users/cmclaughlin-local/.pyenv/versions/raven-3.11.2/lib/python3.11/site-packages/graphtik/fnop.py", line 357, in __init__
    from .jsonpointer import jsonp_path
  File "/Users/cmclaughlin-local/.pyenv/versions/raven-3.11.2/lib/python3.11/site-packages/graphtik/jsonpointer.py", line 37, in <module>
    import pandas as pd
ModuleNotFoundError: No module named 'pandas'

After installing both numpy and pandas, the example works.

I see both in the requirements.txt in the root of the repo, but it doesn't seem that there are any extras_require options in setup.py that install both numpy and pandas. Maybe I'm just not yet familiar enough with the project, but if these are required for getting started shouldn't they get automatically installed?

I'm OK installing numpy and pandas manually, but I figured someone else might hit this problem with less experience and get confused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant