snowflakedb / snowflake-connector-python

Snowflake Connector for Python
https://pypi.python.org/pypi/snowflake-connector-python/
Apache License 2.0
601 stars 473 forks source link

SNOW-869782: Poetry error when installing connector on Mac M2 #1644

Closed Vladislav-Bartalevich closed 8 months ago

Vladislav-Bartalevich commented 1 year ago

Python version

Python 3.10.11 (main, Apr 7 2023, 07:24:53) [Clang 14.0.0 (clang-1400.0.29.202)]

Operating system and processor architecture

macOS-13.4.1-arm64-arm-64bit

Installed packages

aiohttp==3.8.4
aiosignal==1.3.1
allure-pytest==2.13.2
allure-python-commons==2.13.2
anyio==3.7.1
appnope==0.1.3
asn1crypto==1.5.1
asttokens==2.2.1
async-timeout==4.0.2
attrs==23.1.0
Authlib==1.2.1
autoflake==2.2.0
aws-lambda-powertools==2.19.0
aws-xray-sdk==2.12.0
Babel==2.12.1
backcall==0.2.0
bandit==1.7.5
bidict==0.22.1
black==23.3.0
blinker==1.6.2
boto3==1.27.1
botocore==1.30.1
braintree==4.20.0
cachetools==5.3.1
cel-python==0.1.5
CelPy==0.0.1
certifi==2023.5.7
cffi==1.15.1
cfgv==3.3.1
charset-normalizer==3.1.0
click==8.1.3
cognitive-complexity==1.3.0
coverage==7.2.7
cryptography==40.0.2
decorator==5.1.1
distlib==0.3.6
dnspython==2.3.0
ecdsa==0.18.0
email-validator==2.0.0.post2
eradicate==2.3.0
exceptiongroup==1.1.2
execnet==1.9.0
executing==1.2.0
Faker==18.11.2
fastapi==0.99.1
filelock==3.12.2
flake8==6.0.0
flake8-absolute-import==1.0.0.1
flake8-annotations-complexity==0.0.7
flake8-bandit==4.1.1
flake8-cognitive-complexity==0.1.0
flake8-docstrings==1.7.0
flake8-eradicate==1.5.0
flake8-functions==0.0.8
flake8-isort==6.0.0
flake8-print==5.0.0
Flake8-pyproject==1.2.3
flake8-pytest==1.4
Flask==2.3.2
Flask-Admin==1.6.1
freezegun==1.2.2
frozenlist==1.3.3
gitdb==4.0.10
GitPython==3.1.31
graphviz==0.20.1
h11==0.14.0
httpcore==0.17.3
httpx==0.24.1
identify==2.5.24
idna==3.4
importlib-metadata==6.7.0
iniconfig==2.0.0
ipdb==0.13.13
ipython==8.14.0
isort==5.12.0
itsdangerous==2.1.2
jedi==0.18.2
Jinja2==3.1.2
jmespath==1.0.1
lark-parser==0.12.0
mangum==0.17.0
markdown-it-py==3.0.0
MarkupSafe==2.1.3
matplotlib-inline==0.1.6
mccabe==0.7.0
mdurl==0.1.2
mock==5.0.2
mr-proper==0.0.7
multidict==6.0.4
mypy==1.4.1
mypy-extensions==1.0.0
nodeenv==1.8.0
numpy==1.25.1
oscrypto==1.3.0
packaging==23.1
parso==0.8.3
pathspec==0.11.1
pbr==5.11.1
pexpect==4.8.0
pickleshare==0.7.5
pip-licenses==4.3.2
platformdirs==3.8.0
pluggy==1.2.0
polyfactory==2.5.0
pprintpp==0.4.0
pre-commit==3.3.3
prettytable==3.8.0
prompt-toolkit==3.0.39
psycopg==3.1.9
psycopg-binary==3.1.9
psycopg-c==3.1.9
psycopg-pool==3.1.7
ptyprocess==0.7.0
pure-eval==0.2.2
pyarrow==12.0.1
pyasn1==0.5.0
pycodestyle==2.10.0
pycparser==2.21
pycryptodomex==3.18.0
pydantic==1.10.11
pydocstyle==6.3.0
pyflakes==3.0.1
Pygments==2.15.1
pyhumps==3.8.0
PyJWT==2.7.0
pyOpenSSL==23.2.0
PyPika==0.48.9
pytest==7.4.0
pytest-asyncio==0.21.0
pytest-clarity==1.0.1
pytest-cov==4.1.0
pytest-mock==3.11.1
pytest-randomly==3.12.0
pytest-xdist==3.3.1
python-dateutil==2.8.2
python-dotenv==1.0.0
python-jose==3.3.0
pytz==2023.3
PyYAML==6.0
redis==4.6.0
requests==2.31.0
rich==13.4.2
rsa==4.9
s3transfer==0.6.1
sentry-sdk==1.27.1
six==1.16.0
smmap==5.0.0
sniffio==1.3.0
snowballstemmer==2.2.0
sortedcontainers==2.4.0
SQLAlchemy==1.4.49
sqlalchemy-stubs==0.4
sqlparse==0.4.4
ssm-parameter-store==19.11.0
stack-data==0.6.2
starlette==0.27.0
starlette-context==0.3.6
stdlib-list==0.9.0
stevedore==5.1.0
structlog==23.1.0
structlog-sentry==2.0.3
tabulate==0.9.0
tenacity==8.2.2
tomli==2.0.1
traitlets==5.9.0
typer==0.9.0
types-braintree==4.20.0.0
types-cachetools==5.3.0.5
types-click==7.1.8
types-Flask==1.1.6
types-Jinja2==2.11.9
types-MarkupSafe==1.1.10
types-pyasn1==0.4.0.5
types-pyOpenSSL==23.2.0.1
types-python-dateutil==2.8.19.13
types-python-jose==3.3.4.7
types-pytz==2023.3.0.0
types-redis==4.6.0.2
types-requests==2.31.0.1
types-tabulate==0.9.0.2
types-urllib3==1.26.25.13
types-Werkzeug==1.0.9
typing_extensions==4.7.1
urllib3==1.26.16
uvicorn==0.22.0
virtualenv==20.23.1
wcwidth==0.2.6
Werkzeug==2.3.6
wrapt==1.15.0
WTForms==3.0.1
yarl==1.9.2
yoyo-migrations==8.2.0
zipp==3.15.0

What did you do?

poetry add snowflake-connector-python@latest        
Using version ^3.0.4 for snowflake-connector-python

Updating dependencies
Resolving dependencies... (1.5s)

Package operations: 1 install, 0 updates, 0 removals

  • Installing snowflake-connector-python (3.0.4): Failed

  RuntimeError

  Unable to find installation candidates for snowflake-connector-python (3.0.4)

  at /opt/homebrew/Cellar/poetry/1.4.2/libexec/lib/python3.11/site-packages/poetry/installation/chooser.py:76 in choose_for
       72│ 
       73│             links.append(link)
       74│ 
       75│         if not links:
    →  76│             raise RuntimeError(f"Unable to find installation candidates for {package}")
       77│ 
       78│         # Get the best link
       79│         chosen = max(links, key=lambda link: self._sort_key(package, link))
       80│ 

What did you expect to see?

No error; package installed. At the same time, pip install snowflake-connector-python==3.0.4 works as expected.

gleno commented 1 year ago

I have the same issue sans the M2 mac (intel mac)

sfc-gh-aalam commented 1 year ago

If pip is working but poetry can't find packages, I think this is an issue with poetry then?

gleno commented 1 year ago

If pip is working but poetry can't find packages, I think this is an issue with poetry then?

Poetry is probably more strict in general and less forgiving. But since it works literally with a 1000 other packages in our project, and fails with the 3.0.4 snowflake connector, why let's investigate this package first.

sfc-gh-aalam commented 1 year ago

Have you tried suggestions like these: https://stackoverflow.com/questions/71802816/unable-to-find-installation-candidates-in-poetry-trying-to-install-genicam ?

sfc-gh-dszmolka commented 8 months ago

marking this one as closed for now as suggestion for getting around the issue has been given. if you still require assistance, please do comment and we can reopen and look further. thank you !