Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-507597: Not supported error on Apple M1 #986

Closed
richiejthomas opened this issue Nov 23, 2021 · 33 comments
Closed

SNOW-507597: Not supported error on Apple M1 #986

richiejthomas opened this issue Nov 23, 2021 · 33 comments
Assignees
Labels
enhancement The issue is a request for improvement or a new feature

Comments

@richiejthomas
Copy link

richiejthomas commented Nov 23, 2021

Please answer these questions before submitting your issue. Thanks!

  1. What version of Python are you using?

    Python 3.9.1

  2. What operating system and processor architecture are you using?

macOS-12.0.1-arm64-arm-64bit

  1. What are the component versions in the environment (pip freeze)?

asn1crypto==1.4.0
certifi==2021.10.8
cffi==1.15.0
charset-normalizer==2.0.7
cryptography==3.4.8
idna==3.3
numpy==1.21.4
oscrypto==1.2.1
pandas==1.3.4
pyarrow==5.0.0
pycparser==2.21
pycryptodomex==3.11.0
PyJWT==2.3.0
pyOpenSSL==20.0.1
python-dateutil==2.8.2
pytz==2021.3
requests==2.26.0
six==1.16.0
snowflake-connector-python==2.7.1
urllib3==1.26.7

  1. What did you do?

import pandas as pd
import snowflake.connector

conn = snowflake.connector.connect(
user='',
password='',
account='',
warehouse='',
database='',
schema=''
)

cur = conn.cursor()

sql = "select id from <TABLE_NAME>"
cur.execute(sql)

df = cur.fetch_pandas_all()
print(df)

  1. What did you expect to see?

Expected to see dataframe values printed although saw this error

File "lib/python3.9/site-packages/snowflake/connector/cursor.py", line 968, in fetch_pandas_all
raise NotSupportedError
snowflake.connector.errors.NotSupportedError: Unknown error

Process finished with exit code 1

  1. Can you set logging to DEBUG and collect the logs?

Cannot attach full log since it included confidential info although the error might be happening here

2021-11-22 23:01:56,853 - MainThread cursor.py:616 - execute() - DEBUG - executing SQL/command
2021-11-22 23:01:56,853 - MainThread cursor.py:649 - execute() - DEBUG - binding: [select id from <TABLE_NAME>] with input=[None], processed=[{}]
2021-11-22 23:01:56,854 - MainThread cursor.py:696 - execute() - INFO - query: [select id from <TABLE_NAME>]
2021-11-22 23:01:56,854 - MainThread cursor.py:426 - _execute_helper() - DEBUG - Cannot use arrow result format, fallback to json format

@github-actions github-actions bot changed the title Not supported error on Apple M1 SNOW-507597: Not supported error on Apple M1 Nov 23, 2021
@sfc-gh-hchaturvedi sfc-gh-hchaturvedi added enhancement The issue is a request for improvement or a new feature M1-Demand and removed bug needs triage labels Dec 2, 2021
@sfc-gh-hchaturvedi
Copy link
Collaborator

Hey @richiejthomas, we are starting to look into what will be needed to support M1 and will provide an update once we have completed our analysis.

@thomasaarholt
Copy link
Contributor

@sfc-gh-hchaturvedi I successfully just installed and ran dbt-snowflake on an M1 Macbook Pro using latest snowflake-connector-python master branch. There the pyarrow dependency is no longer a problem (current published latest version has a dependency issue with pyarrow 5).

Could I ask the snowflake team to please publish a patch version from latest master (remember to bump the versio number :) )? I think that will solve everyone's problem.

On a M1 Macbook:

# Create a python 3.9 environment (3.10 did *not* work with dbt, I think there aren't arm wheel for 3.10?)
# I did `conda create --name dbt python=3.9`
# conda activate dbt
pip install https://github.com/snowflakedb/snowflake-connector-python/archive/refs/heads/master.zip # install snowflake-connector-python master
pip install dbt-core
# check `which dbt`, ensure it is the right one, otherwise reactivate environment
# call `dbt`, this should work
pip install dbt-snowflake

dbt deps # fix new dependencies
dbt run -m your_model

Here's the python process during dbt run, red line highlighting that this is native arm. Otherwise it would say "Intel".
image

@kzecchini
Copy link

@sfc-gh-hchaturvedi I'm also facing this issue - just wondering if there is any progress on this?

@sfc-gh-dseweryn
Copy link

It seems that version 2.7.4 supports M1

@kzecchini
Copy link

I upgraded to 2.7.4 (snowflake-connector-python==2.7.4, pyarrow==6.0.1) and I am still getting the same error:

...
"/.../lib/python3.9/site-packages/snowflake/connector/cursor.py", line 978, in fetch_pandas_all
    raise NotSupportedError
snowflake.connector.errors.NotSupportedError: Unknown error

When I tried to force the use of the arrow_iterator module (setting CAN_USE_ARROW_RESULT_FORMAT to true), I see the following:

ImportError: dlopen(/.../lib/python3.9/site-packages/snowflake/connector/arrow_iterator.cpython-39-darwin.so, 0x0002): tried: '/.../lib/python3.9/site-packages/snowflake/connector/arrow_iterator.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/arrow_iterator.cpython-39-darwin.so' (no such file), '/usr/lib/arrow_iterator.cpython-39-darwin.so' (no such file)

To me it still looks like the arrow_iterator is incompatible with M1 architecture...

Is there anything I need to change/install/reinstall to get this to work?

@sfc-gh-dseweryn
Copy link

I don't see pyarrow==6.0.1 anywhere in the requirements/dependencies of snowflake-connector-python nor in the pip list so I cannot tell

@kzecchini
Copy link

kzecchini commented Feb 22, 2022

So I tried uninstalling and installing the snowflake connector via pip (without cache) but that didn't work.

Instead I decided to build from source. I followed the instructions in the readme to build the wheel from the repo and it works perfectly now.

My guess is that the PyPI distribution is not built for ARM? I'm not entirely sure what exactly is uploaded to PyPI.

@kzecchini
Copy link

Also wanted to add that installing via:

pip install git+https://github.com/snowflakedb/snowflake-connector-python.git

also works for M1 instead of the PyPI install.

@sfc-gh-dseweryn
Copy link

I first installed via pip from the main branch. Then I uninstalled and installed 2.7.3 and 2.7.4 and it worked just fine for me. Unfortunately I am not too familiar with python toolchain to be sure if I by chance have different dependencies after I installed from main.

@kzecchini
Copy link

@sfc-gh-dseweryn are you installing via PyPI? Or building the wheel from source?

@thomasaarholt
Copy link
Contributor

thomasaarholt commented Feb 23, 2022

A couple of clarifications: If you're trying to install in Docker on an M1 Mac, then you have different requirements than if you were installing on your M1 Mac. We've had trouble with a lot of packages after we began running our docker containers natively on Mac rather than emulating them via Rosetta. Many of those problems are being worked out. The snowflake connector still has some issues:

Installing on Mac, the following fails:

$ pip install snowflake-connector-python[pandas,secure-local-storage]
zsh: no matches found: snowflake-connector-python[pandas,secure-local-storage]

pip install snowflake-connector-python works, but then you get pyarrow errors since you're missing the extras mentioned in the code block.

I do not know how to solve this.

Installing in Docker (Debian linux) on an M1 Mac:
The following is crazy, but it works to install snowflake-connector-python:
If you're getting the following error:

  File "/root/venv/lib/python3.8/site-packages/snowflake/connector/cursor.py", line 978, in fetch_pandas_all
    raise NotSupportedError
snowflake.connector.errors.NotSupportedError: Unknown error

Try reinstalling snowflake-connector-python at version 2.7.2 by pip install -U snowflake-connector-python==2.7.2.

Starting from an empty Python 3.9 environment, you can get it running like this:

pip install snowflake-connector-python[pandas,secure-local-storage]==2.7.4 --no-use-pep517
pip install -U snowflake-connector-python==2.7.2

@sfc-gh-dseweryn
Copy link

The first time the connector installed successfully for me I used:

pip3.9 install git+git://github.com/snowflakedb/snowflake-connector-python@main

then ran

pip3.9 install snowflake-connector-python==2.7.4

then I uninstalled snowflake-connector-python, updated requirements.txt to have version 2.7.4 and checked ran

pip3.9 install -r requirements.txt

I hope this clarifies everything :)

@kzecchini
Copy link

kzecchini commented Feb 23, 2022

@thomasaarholt So you have to put quotes around the package to install via zsh:

pip install "snowflake-connector-python[pandas,secure-local-storage]"   

When I do this I have the pyarrow dependencies, but they don't appear to be built for ARM when you download from PyPI.

Also I have no problem running debian docker containers with snowflake-connector-python==2.7.4 on M1 mac (using images with the build flag --platform=linux/amd64)

@kzecchini
Copy link

kzecchini commented Feb 23, 2022

@sfc-gh-dseweryn thanks for the clarification. From a new environment, If you try to install from PyPI with no cache pip install --no-cache snowflake-connector-python[pandas]==2.7.4 - does it work for you?

I'm wondering if the first install from source is cached, and then the other subsequent installs are working from the locally cached wheel instead of going out to PyPI for the wheel.

Because for my M1 mac it seems to only work when I build the wheel locally. When I download from PyPI the wheel doesn't work. I just tested with a new environment both building from source and getting the wheel from PyPI.

Building from source (this works - note the wheel name has arm64 in it):

$ pip install git+https://github.com/snowflakedb/snowflake-connector-python.git                                                                                                                                                                        

Collecting git+https://github.com/snowflakedb/snowflake-connector-python.git
  Cloning https://github.com/snowflakedb/snowflake-connector-python.git to /private/var/folders/zw/40p7ybbx0f77mzwc80_0_0kdzhh2rz/T/pip-req-build-vs2vctki
  Running command git clone -q https://github.com/snowflakedb/snowflake-connector-python.git /private/var/folders/zw/40p7ybbx0f77mzwc80_0_0kdzhh2rz/T/pip-req-build-vs2vctki
  Resolved https://github.com/snowflakedb/snowflake-connector-python.git to commit 0a9c74a8ba348b6664f024bafd97d7d605f1f156
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
...
Building wheels for collected packages: snowflake-connector-python
  Building wheel for snowflake-connector-python (PEP 517) ... done
  Created wheel for snowflake-connector-python: filename=snowflake_connector_python-2.7.4-cp39-cp39-macosx_11_0_arm64.whl size=8858782 sha256=d8e8033664ece7b7ee57dc53610ab36c55cabc715832bda5afeef5e70175bb0e
  Stored in directory: /private/var/folders/zw/40p7ybbx0f77mzwc80_0_0kdzhh2rz/T/pip-ephem-wheel-cache-e4iac3yz/wheels/94/47/dc/99235024092c5237d99fa37600bcc37d0984c6875891bff470
Successfully built snowflake-connector-python
Installing collected packages: snowflake-connector-python
Successfully installed snowflake-connector-python-2.7.4

This wheel doesn't work on M1 from PyPI:

$ pip install --no-cache "snowflake-connector-python[pandas]==2.7.4"

Collecting snowflake-connector-python[pandas]==2.7.4
  Downloading snowflake_connector_python-2.7.4-cp39-cp39-macosx_10_14_universal2.whl (10.3 MB)

So you can see that when building from source we have: snowflake_connector_python-2.7.4-cp39-cp39-macosx_11_0_arm64.whl vs. when installing from PyPI we get snowflake_connector_python-2.7.4-cp39-cp39-macosx_10_14_universal2.whl.

Maybe it is an OS issue? MacOS 11.0 vs MacOS 10.14? But I am not sure if the universal wheel is actually universal for M1. I think that this is the underlying issue, and there needs to be a wheel in PyPI which is compatible with M1.

@thomasaarholt
Copy link
Contributor

@kzecchini god, that's an unfortunate need of quotes! Thanks for pointing that out!

I've noticed the M1 arm vs universal issue too. I know that pip will always prefer specific wheels over universal wheels if available. I notice the arm ones are not available on pypi.

If you force building the wheels, then it will work on M1 mac:
pip install 'snowflake-connector-python[pandas,secure-local-storage]' --no-binary snowflake-connector-python

@thomasaarholt
Copy link
Contributor

thomasaarholt commented Feb 23, 2022

I successfully run sql queries into pandas using the following dockerfile:

# Store in a file with filename "Dockerfile"
FROM python:3.9-slim-buster

# required to build pycryptodomex, which is required by secure-local-storage
RUN apt-get update && apt-get install -y gcc g++ 

RUN pip install 'snowflake-connector-python[pandas,secure-local-storage]' --no-binary snowflake-connector-python


COPY script.py /script.py

CMD ["sh", "-c", "python script.py"]

Where script.py contains the following snowflake sql query (replace your own variables), and is in the same folder as the Dockerfile above.

from snowflake.connector import connect

con = connect(
    user=my_username,
    password=my_password,
    account=sql_account,
)
df = con.cursor().execute("select * from database.schema.my_table limit 10").fetch_pandas_all()
print("It worked!")
print(df)

Run as

docker build -t snow .
docker run snow

@kzecchini
Copy link

@thomasaarholt Thanks for the info! I just verified that adding the --no-binary works as well for me. I never used that before - thanks for pointing that out!

So it just seems like the solution for PyPI would be to get the ARM distribution uploaded so folks could easily install a prebuilt wheel that works on M1.

But the workaround for now is to either install from source, or to use the --no-binary flag when installing via PyPI.

@richiejthomas
Copy link
Author

richiejthomas commented Feb 23, 2022

@thomasaarholt Thanks for the workaround using the --no-binary flag! That works perfectly.

@thomasaarholt
Copy link
Contributor

Annoyingly, the above will not build using google clouds docker using buildx to build multi-arch images (specifically building an arm image on x86_64). It fails with a qemu fatal error.

@yuvrajsharma9981
Copy link

Hi,

I was facing the same error (M1 mac), and this thread really helped me out. The suggestion of using --non-binary option with pip worked for me. So, Thank you so much for that @thomasaarholt.

However, during this, I discovered another issue, although after spending some time debugging it. I kinda find a solution for it, but I'm still not sure why that error was happening. I thought it would be a good idea to put it here, in case of some face the same issue as me, it might help them. So, someone smarter and well-versed, in this topic, than me (like @thomasaarholt ) might be able to explain to me why it was happening.

So, after you use the --no-binary option posted above, snowflake-connector-python will work as expected, however, if you install certain libraries after this, for example, jupyterlab, you will again start getting the error:

MemoryError: Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks

This is the same error I was getting while trying to run snowflake.connector.connect function when I installed snowflake-connector-python using simply conda install snowflake-connector-python and went away when I installed using the pip with --no-binary option.

Just to give the EXACT steps I followed, in case, someone wants to recreate it:

conda create -n XYZ
conda activate XYZ

conda install numpy pandas=1.35 matplotlib

conda install pycryptodomex

pip install 'snowflake-connector-python[pandas,secure-local-storage]' --no-binary snowflake-connector-python

At this point, running snowflake.connector.connect gives no error, and run as expected.

conda install jupterlab

Everything here installs perfectly but running snowflake.connector.connect gives the Memory error I mentioned above.

After debugging it for some time, I figure out the cause of it. Basically, it is not jupyterlab (or other similar packages) that is causing the issue, but one of its dependencies - CFFI (https://cffi.readthedocs.io/en/latest/).

CFFI is installed with snowflake-connector-python as one of it's dependencies and the package works perfectly, but when you install jupyterlab conda installs cffi again (as we know conda doesn't check for packages installed by PyPI). You can recreate the same error just by doing conda install cffi right after you install the snowflake connector with pip --no-binary option.

Work around I found, just install jupyterlab or any other package which has cffi as it's dependency through PYPI in the conda virtual environment.

However, I'm still confused why does cffi installation from PyPI works, but from Conda doesn't, even though conda-forge has osx-arm compatible installer for cffi. My guess is - this dependency is the same reason why conda install snowflake-connector-python doesn't work despite it having an osx-arm compatible installer.

I hope it helps anyone who might struggle with this issue, or if someone can tell me why this issue is happening in the first place!

@sfc-gh-mkeller
Copy link
Collaborator

So the problem that this issue is discussing:

snowflake.connector.errors.NotSupportedError: Unknown error

means that this package's c-extension is not available.

I can see this being a wide spread issue before pyarrow started releasing aarch64 wheels, but this should not really be an issue anymore. The flag --no-binary snowflake-connector-python should force source distribution installation and that should be able to compile the c-extension correctly.

I think Anaconda environments could have more issues, but I'm not familiar with them.

@pblankley
Copy link

^^ This is the right way to solve this problem! Thanks @sfc-gh-mkeller 🙌

@tekumara
Copy link
Contributor

tekumara commented May 2, 2022

@sfc-gh-mkeller this is still an issue because the snowflake connector wheels (as of 2.7.7) aren't built for arm:

$ python -c 'from snowflake.connector.arrow_iterator import PyArrowIterator'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: dlopen(/Users/tekumara/code/app/.venv/lib/python3.9/site-packages/snowflake/connector/arrow_iterator.cpython-39-darwin.so, 0x0002): tried: '/Users/tekumara/code/app/.venv/lib/python3.9/site-packages/snowflake/connector/arrow_iterator.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))

see also #1089 (comment)

could the snowflake connector wheels be built for arm?

@sfc-gh-mkeller
Copy link
Collaborator

We're currently working on releasing ARM builds for our Python connector

@imperd1x
Copy link

In my case, the solution we found is before running Pipfile install pycryptodomex==3.10.3 (the version where they fix the M1 issue).

We're currently working on releasing ARM builds for our Python connector

Any update soon? cheers

@domfp13
Copy link

domfp13 commented Jul 30, 2022

running python 3.9 solved my issue

@sfc-gh-mkeller
Copy link
Collaborator

So we have been releasing MacOS ARM wheels since release 2.7.8.

Please be aware that this does not mean that you won't see:

File "lib/python3.9/site-packages/snowflake/connector/cursor.py", line 968, in fetch_pandas_all
    raise NotSupportedError

This error could mean 2 things:

  1. The server-side was unable to produce Arrow results
    Our back-end can produce JSON, or Arrow results. Arrow results are necessary for our current implementation for fetch_pandas_* and fetch_arrow_* to work. Please note that only a subset of SELECT statements can produce Arrow results, this is better explained by this comment, if you think you are encountering this issue, please use that ticket.
  2. The client-side is unable to parse arrow results
    Us releasing pre-built wheels should help with this, but as an example if you force building from source you need to make sure that our C-extensions have been built correctly. The client has a mechanism to tell the server to create JSON results if the C-extension is missing, but that will also lead to NotSupportedError being raised when you try to fetch_pandas_all.

Hopefully most of you are running into this because the C-extension is missing and this should have been helped by us releasing MacOS ARM wheels.

@Mark-Nichols-McKinsey
Copy link

@thomasaarholt solution worked for me. I don't need dbt, but whatever it worked on a 2022 MacBook Pro M1 running Venture. The standard install method game me a dependency error related to PyArrow

@fearedbliss
Copy link

Thanks for this info everyone. I was having trouble installing the connector (pip install snowflake-connector-python) in a fresh virtual environment on Python 3.7.13 on an M1 Mac running Mac OS 12.6.1. After checking the links above and the wheels for 3.0.0, I noticed that we don't have any M1 mac arm64 builds for 3.7. We currently have some projects running on 3.7 that we want to use this on. Is there any possibility that a M1 Py3.7 build could be provided (I'm not sure if there is a technical limitation for it starting on 3.9 or if it was just provided for 3.9+ based on demand)?

https://pypi.org/project/snowflake-connector-python/3.0.0/#files

The connector installed fine on Python 3.10.6, 3.10.10, 3.11.2. We can see that a wheel isn't fetched for 3.7 (Makes sense), but it does for 3.10 and 3.11 :):

(venv) jon@machine: ~/Projects/sfc $ pip install snowflake-connector-python
Looking in indexes: http://<repo>/repository/pypi-group/simple
Collecting snowflake-connector-python
  Using cached http://<repo>/repository/pypi-group/packages/snowflake-connector-python/3.0.0/snowflake-connector-python-3.0.0.tar.gz (395 kB)
  Installing build dependencies ... \

=====

(venv) jon@machine: ~/Projects/sfc $ pip install snowflake-connector-python
Looking in indexes: http://<repo>/repository/pypi-group/simple
Collecting snowflake-connector-python
  Using cached http://<repo>repository/pypi-group/packages/snowflake-connector-python/3.0.0/snowflake_connector_python-3.0.0-cp310-cp310-macosx_11_0_arm64.whl (15.4 MB)

=====

(venv) jon@machine: ~/Projects/sfc $ pip install snowflake-connector-python
Looking in indexes: http://<repo>/repository/pypi-group/simple
Collecting snowflake-connector-python
  Downloading http://<repo>/repository/pypi-group/packages/snowflake-connector-python/3.0.0/snowflake_connector_python-3.0.0-cp311-cp311-macosx_11_0_arm64.whl (15.4 MB)

@fearedbliss
Copy link

These are also some follow up steps I needed to do to get it to successfully execute a query and avoid the dlopen / Arrow issue upon import (This has already been mentioned above, but this is a quick consolidation, Also on 3.11.2):


(venv) jon@machine: ~/Projects/sfc $ python main.py
Failed to import ArrowResult. No Apache Arrow result set format can be used. ImportError: dlopen(/Users/jonathan.vasquez/Projects/sfc/venv/lib/python3.11/site-packages/snowflake/connector/arrow_iterator.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace (__ZN5arrow12ArrayBuilder12AppendScalarERKNS_6ScalarEx)
hello


(venv) jon@machine: ~/Projects/sfc $ pip install pyarrow==10.0.1
Looking in indexes: http://<repo>/repository/pypi-group/simple
Collecting pyarrow==10.0.1
  Downloading http://<repo>/repository/pypi-group/packages/pyarrow/10.0.1/pyarrow-10.0.1-cp311-cp311-macosx_11_0_arm64.whl (22.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 22.9/22.9 MB 11.0 MB/s eta 0:00:00
Collecting numpy>=1.16.6
  Downloading http://<repo>/repository/pypi-group/packages/numpy/1.24.2/numpy-1.24.2-cp311-cp311-macosx_11_0_arm64.whl (13.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.8/13.8 MB 11.8 MB/s eta 0:00:00
Installing collected packages: numpy, pyarrow
Successfully installed numpy-1.24.2 pyarrow-10.0.1


(venv) jon@machine: ~/Projects/sfc $ python main.py
Failed to import ArrowResult. No Apache Arrow result set format can be used. ImportError: dlopen(/Users/jonathan.vasquez/Projects/sfc/venv/lib/python3.11/site-packages/snowflake/connector/arrow_iterator.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace (__ZN5arrow12ArrayBuilder12AppendScalarERKNS_6ScalarEx)
hello


jon@machine: ~/Projects/sfc $ deactivate
jon@machine: ~/Projects/sfc $ rm -rf venv
jon@machine: ~/Projects/sfc $ python -m venv venv
jon@machine: ~/Projects/sfc $ . venv/bin/activate
(venv) jon@machine: ~/Projects/sfc $ pip install snowflake-connector-python[pandas]
zsh: no matches found: snowflake-connector-python[pandas]
(venv) jon@machine: ~/Projects/sfc $ pip install "snowflake-connector-python[pandas]"
Looking in indexes: http://<repo>/repository/pypi-group/simple
Collecting snowflake-connector-python[pandas]
  Using cached http://<repo>/repository/pypi-group/packages/snowflake-connector-python/3.0.0/snowflake_connector_python-3.0.0-cp311-cp311-macosx_11_0_arm64.whl (15.4 MB)
Collecting asn1crypto<2.0.0,>0.24.0
  Using cached http://<repo>/repository/pypi-group/packages/asn1crypto/1.5.1/asn1crypto-1.5.1-py2.py3-none-any.whl (105 kB)
Collecting cffi<2.0.0,>=1.9
  Using cached http://<repo>/repository/pypi-group/packages/cffi/1.15.1/cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl (174 kB)
Collecting cryptography<41.0.0,>=3.1.0
  Using cached http://<repo>/repository/pypi-group/packages/cryptography/39.0.1/cryptography-39.0.1-cp36-abi3-macosx_10_12_universal2.whl (5.4 MB)
Collecting oscrypto<2.0.0
  Using cached http://<repo>/repository/pypi-group/packages/oscrypto/1.3.0/oscrypto-1.3.0-py2.py3-none-any.whl (194 kB)
Collecting pyOpenSSL<24.0.0,>=16.2.0
  Using cached http://<repo>/repository/pypi-group/packages/pyopenssl/23.0.0/pyOpenSSL-23.0.0-py3-none-any.whl (57 kB)
Collecting pycryptodomex!=3.5.0,<4.0.0,>=3.2
  Using cached http://<repo>/repository/pypi-group/packages/pycryptodomex/3.17/pycryptodomex-3.17-cp35-abi3-macosx_10_9_universal2.whl (2.4 MB)
Collecting pyjwt<3.0.0
  Using cached http://<repo>/repository/pypi-group/packages/pyjwt/2.6.0/PyJWT-2.6.0-py3-none-any.whl (20 kB)
Collecting pytz
  Using cached http://<repo>/repository/pypi-group/packages/pytz/2022.7.1/pytz-2022.7.1-py2.py3-none-any.whl (499 kB)
Collecting requests<3.0.0
  Using cached http://<repo>/repository/pypi-group/packages/requests/2.28.2/requests-2.28.2-py3-none-any.whl (62 kB)
Requirement already satisfied: setuptools>34.0.0 in ./venv/lib/python3.11/site-packages (from snowflake-connector-python[pandas]) (65.5.0)
Collecting charset-normalizer<3,>=2
  Using cached http://<repo>/repository/pypi-group/packages/charset-normalizer/2.1.1/charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Collecting idna<4,>=2.5
  Using cached http://<repo>/repository/pypi-group/packages/idna/3.4/idna-3.4-py3-none-any.whl (61 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached http://<repo>/repository/pypi-group/packages/urllib3/1.26.14/urllib3-1.26.14-py2.py3-none-any.whl (140 kB)
Collecting certifi>=2017.4.17
  Using cached http://<repo>/repository/pypi-group/packages/certifi/2022.12.7/certifi-2022.12.7-py3-none-any.whl (155 kB)
Collecting typing-extensions<5,>=4.3
  Using cached http://<repo>/repository/pypi-group/packages/typing-extensions/4.5.0/typing_extensions-4.5.0-py3-none-any.whl (27 kB)
Collecting filelock<4,>=3.5
  Using cached http://<repo>/repository/pypi-group/packages/filelock/3.9.0/filelock-3.9.0-py3-none-any.whl (9.7 kB)
Collecting pandas<1.6.0,>=1.0.0
  Downloading http://<repo>/repository/pypi-group/packages/pandas/1.5.3/pandas-1.5.3-cp311-cp311-macosx_11_0_arm64.whl (10.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.8/10.8 MB 5.7 MB/s eta 0:00:00
Collecting pyarrow<10.1.0,>=10.0.1
  Using cached http://<repo>/repository/pypi-group/packages/pyarrow/10.0.1/pyarrow-10.0.1-cp311-cp311-macosx_11_0_arm64.whl (22.9 MB)
Collecting pycparser
  Using cached http://<repo>/repository/pypi-group/packages/pycparser/2.21/pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting python-dateutil>=2.8.1
  Using cached http://<repo>/repository/pypi-group/packages/python-dateutil/2.8.2/python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting numpy>=1.21.0
  Using cached http://<repo>/repository/pypi-group/packages/numpy/1.24.2/numpy-1.24.2-cp311-cp311-macosx_11_0_arm64.whl (13.8 MB)
Collecting six>=1.5
  Using cached http://<repo>/repository/pypi-group/packages/six/1.16.0/six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: pytz, asn1crypto, urllib3, typing-extensions, six, pyjwt, pycryptodomex, pycparser, oscrypto, numpy, idna, filelock, charset-normalizer, certifi, requests, python-dateutil, pyarrow, cffi, pandas, cryptography, pyOpenSSL, snowflake-connector-python
Successfully installed asn1crypto-1.5.1 certifi-2022.12.7 cffi-1.15.1 charset-normalizer-2.1.1 cryptography-39.0.1 filelock-3.9.0 idna-3.4 numpy-1.24.2 oscrypto-1.3.0 pandas-1.5.3 pyOpenSSL-23.0.0 pyarrow-10.0.1 pycparser-2.21 pycryptodomex-3.17 pyjwt-2.6.0 python-dateutil-2.8.2 pytz-2022.7.1 requests-2.28.2 six-1.16.0 snowflake-connector-python-3.0.0 typing-extensions-4.5.0 urllib3-1.26.14

@sfc-gh-mkeller
Copy link
Collaborator

@fearedbliss our limitation comes from pyarrow not being available for Python 3.7 on arm macs. Which our C-extension links against.
It looks like you have your own PyPi repository, you can compile our project yourself once you have our build dependencies installed with a command like: pip wheel -w dist --no-deps --no-build-isolation snowflake-connector-python

@fearedbliss
Copy link

@sfc-gh-mkeller Thanks Mark. We'll give that a shot. Worse case scenario, we'll need to start working on a Python 3.7 -> 3.11 migration. Given 3.7 has an EOL of 2023-06-27, it wouldn't be the worse thing to do haha. Plus 3.11 has some very nice speed improvements, error handling and reporting improvements as well. Thanks LLVM and Rust for pushing the ecosystem forward!

@fearedbliss
Copy link

@sfc-gh-mkeller It doesn't seem like it's really possible to easily get a Python 3.7 M1 build given what I looked at from PyArrow's codebase and some comments in the code. I'm starting the process of migrating our stuff to Python 3.11 (from Python 3.7) across our infra. I guess one of the benefits is that we'll be able to get Py 3.11 support until 2027! But yea, I'll need to do the work to get this to happen though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is a request for improvement or a new feature
Projects
None yet
Development

No branches or pull requests