Skip to Content

HANA database service on cloud foundry with python does not work

Hi,

I am very new to cloud foundry and python and want to try the tutorial from https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/0a99ed7085b8447cb303c43253f2c704.html

to build a python app using the HANA database service.

However, after following the steps in the tutorial the app does not start and throws an error like:

File "server.py", line 4, in

from hdbcli import dbapi

ModuleNotFoundError: No module named 'hdbcli'

I had downloaded th XS_PYTHON and extracted it to a directory . Then the download command was issued as in the tutorial

pip download -d vendor -r requirements.txt –-find-links sap_dependencies

The vendor directory then looks like

What am I missing ?

any help is appreciated.

unbenannt.png (29.7 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Mar 09 at 08:44 AM

    Hi,

    finally got it.

    The files for other platforms are to be included ( hdbcli-2.3.14-cp36-cp36****.whl) in the vendor directory and the requirements.txt has another line with "hdbcli==2.3.14".

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      hello Marcus,

      I have followed the exact same process but still i am facing the same error :

      2018-03-31T15:08:53.27+0530 [STG/0] ERR Could not find a version that satisfies the requirement hdbcli==2.3.14 (from -r /tmp/contents463332238/deps/0/requirements.txt (line 3)) (from versions: ) 2018-03-31T15:08:53.27+0530 [STG/0] ERR No matching distribution found for hdbcli==2.3.14 (from -r /tmp/contents463332238/deps/0/requirements.txt (line 3)).

      waiting eagerly for reply.

      Regards,

      Navin

  • Mar 09 at 08:43 AM

    Hi,

    finally got it.

    The files for other platforms are to be included ( hdbcli-2.3.14-cp36-cp36****.whl) in the vendor directory and the requirements.txt has another line with "hdbcli==2.3.14".

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 23 at 03:50 PM

    Hi Marcus,

    I have a similar issue. Many dependencies in the vendor folder. It looks like not all of them are uploaded. The installation fails with:

    No matching distribution found for hdbcli==2.3.14 (from -r /tmp/contents253433951/deps/0/requirements.txt (line 3))
    pip install has failed. You have a vendor directory, it must contain all of your dependencies.

    Do you have any idea why the dependency can't be resolved?

    Thank you and best regards

    Raphael

    Add comment
    10|10000 characters needed characters exceeded

    • I got a workaround:

      Just copy the files for a py-version to the 'vendor' folder. Within the requirements-file 'hdbcli' would be enough. Then just start the 'cf push'.

      I think it's not the complete solution, but the 'pip install..' didn't worked for me.

      And on this way I got it working. I'm open for better solutions..