trevorhobenshield / amazon_photos

Amazon Photos API
https://pypi.org/project/amazon_photos
MIT License
44 stars 6 forks source link

pyarrow dependency? #15

Open zerog2k opened 1 month ago

zerog2k commented 1 month ago

I'm not very familiar with the pandas and other data libraries used here, but I got this on fresh install:

2024-05-18 22:47:41.476 [WARNING] :: Database `ap.parquet` not found, initializing new database
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.11/site-packages/amazon_photos/_api.py", line 79, in __init__
    self.db = self.load_db(**kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/amazon_photos/_api.py", line 1191, in load_db
    df.to_parquet(self.db_path)
  File "/usr/local/lib/python3.11/site-packages/pandas/util/_decorators.py", line 333, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pandas/core/frame.py", line 3113, in to_parquet
    return to_parquet(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pandas/io/parquet.py", line 476, in to_parquet
    impl = get_engine(engine)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pandas/io/parquet.py", line 67, in get_engine
    raise ImportError(
ImportError: Unable to find a usable engine; tried using: 'pyarrow', 'fastparquet'.
A suitable version of pyarrow or fastparquet is required for parquet support.
Trying to import the above resulted in these errors:
 - Missing optional dependency 'pyarrow'. pyarrow is required for parquet support. Use pip or conda to install pyarrow.
 - Missing optional dependency 'fastparquet'. fastparquet is required for parquet support. Use pip or conda to install fastparquet.

should setup.py declare a pyarrow dependency?

DDoS commented 1 month ago

You can install pyarrow (recommended) or fastparquet, both should satisfy the dependency.