dropbox / dropbox-sdk-python

The Official Dropbox API V2 SDK for Python
https://www.dropbox.com/developers
MIT License
932 stars 317 forks source link

[HOW TO] Usage example #445

Closed Bra1nsen closed 1 year ago

Bra1nsen commented 1 year ago

Dear developer, i recently discovered the option of using dropbox for saving ML Image Datasets. I use AllSkyImager, which generate 600 Images a day. The Sky Imager is controlled by a raspberry Pi.

I installed via: sudo pip3 install dropbox

copied from examples updown.py - and expected to upload download folder

raceback (most recent call last):
  File "/home/pi/High-Pricision_AD_HAT/python/dropbox_uploader.py", line 19, in <module>
    import dropbox
  File "/home/pi/High-Pricision_AD_HAT/python/dropbox.py", line 4, in <module>
    import pandas as pd
  File "/usr/local/lib/python3.9/dist-packages/pandas/__init__.py", line 16, in <module>
    raise ImportError(
ImportError: Unable to import required dependencies:
numpy: 

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.9 from "/usr/bin/python"
  * The NumPy version is: "1.23.3"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: libcblas.so.3: cannot open shared object file: No such file or directory

I cant spot the cause of the problem, since Numpy is up to date. ( sudo pip install Numpy --upgrade)

pi@skycamuni:~ $ pip install numpy --upgrade --ignore-installed
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting numpy
  Using cached https://www.piwheels.org/simple/numpy/numpy-1.23.3-cp39-cp39-linux_armv7l.whl (12.4 MB)
Installing collected packages: numpy
  WARNING: The scripts f2py, f2py3 and f2py3.9 are installed in '/home/pi/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed numpy-1.23.3

I tried:export PATH="$HOME/.local/bin:$PATH" but it didnt work .. any help would be awesome..

greg-db commented 1 year ago

The error output indicates an issue with the numpy import. As numpy is not made by Dropbox, we cannot offer support for that. I recommend referring to the numpy documentation linked in the error for help with that. There also seems to be a post here about the error you're getting.

Bra1nsen commented 1 year ago

ok no problem i will cancel dropbox and use google drive if youre not able to help.

greg-db commented 1 year ago

The error output you share doesn't reference Dropbox so I can't offer insight on that.

I notice in the stack trace though that you have your own file named "dropbox.py", which you seem to be importing in your file named "dropbox_uploader.py". Since the Dropbox package is also named "dropbox", that could interfere with your ability to import the Dropbox package. I don't know if this is what you intended, but if that's an issue for your setup you may want to rename your "dropbox.py" file to something else. Regardless, that's not related to the numpy error you're actually seeing, other than "dropbox.py" happening to be where you import pandas, so to resolve the actual numpy issue, please refer to the numpy resources.

Bra1nsen commented 1 year ago

iam sorry your first tip was correct, I was able to fix it. Sorry for beeing unnecessarily rude..

THANK YOU greg-db.