'm1 macos can't install hdbcli
I have a script that starts with
import pandas as pd
from sqlalchemy import create_engine, text
hana_engine = create_engine(os.getenv('RCF_HANA_URI'), echo=False)
hana_conn = hana_engine.connect()
postgres_engine = create_engine(os.getenv('RCF_POSTGRES_URI'), echo=False)
I need to run it on my m1 macbook. I tried using conda to create an environment with all the necessary dependencies
conda create --name env pandas sqlalchemy psycopg2
conda activate env
after python script.py
I was missing sqlalchemy-hana but conda install sqlalchemy-hana and pip install sqlalchemy-hana failed because they couldn't find a package with that name with noarch or arm64 for python 3.9.
I tried other python versions
conda create --name env pandas sqlalchemy psycopg2 python=3.5
this failed for arm64 for python 3.5-3.7. 3.8 worked.
conda create --name env2 pandas sqlalchemy psycopg2 python=3.8
conda activate env2
now pip install sqlalchemy-hana
worked. I ran the script again and got
ModuleNotFoundError: No module named 'hdbcli'
So I tried to install it
pip install hdbcli
ERROR: Could not find a version that satisfies the requirement hdbcli (from versions: none)
ERROR: No matching distribution found for hdbcli
And this is where I am stuck. Is there a way to get hdbcli to work on an m1 mac?
Solution 1:[1]
HDBCLI has not yet been released for M1. You can find the official SAP Note as well as a workaround using Apple Rosetta in this blog.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Mathias Kemeter |