-
Notifications
You must be signed in to change notification settings - Fork 477
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-1004188: Python cannot import name 'Mapping' from 'collections' #1848
Comments
@IRISDavidD snowpark supports 3.11. Could you try it? |
I tried 3.11 and get the following issue running: pip3 install --target=. --platform manylinux2010_x86_64 --only-binary=:all: -r requirements.txt ERROR: Cannot install -r requirements.txt (line 1) because these package versions have conflicting dependencies. The conflict is caused by: To fix this you could try to:
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts |
what's in your requirements.txt? |
snowflake-connector-python just to get this working |
A very old version (1.x) of python connector was being installed then an error was raised. The latest version is 3.6.0. |
No idea I thought that was the case but was strange - I will try again and define the latest version |
ERROR: Could not find a version that satisfies the requirement snowflake-connector-python==3.6.0 (from versions: 1.4.5, 1.4.6, 1.4.7, 1.4.8, 1.4.9, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 1.4.14, 1.4.15, 1.4.16, 1.4.17, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.6.6, 1.6.7, 1.6.8, 1.6.9, 1.6.10, 1.6.11, 1.6.12, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.7.8, 1.7.9, 1.7.10, 1.7.11, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.8.7, 1.9.1) |
removed --platform manylinux2010_x86_64 and installs but this doesn't work in the lambda layer I get this error "Unable to import module 'lambda_function': /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /opt/python/cryptography/hazmat/bindings/_rust.abi3.so)" |
I haven't tried the lambda myself. Does this help? https://interworks.com/blog/2023/03/28/how-to-install-the-snowflake-python-connector-in-aws-lambda/ |
I have 3.9 is working was hoping for a more updated python version. |
I'm having the same issue with python 3.11 |
Even with 3.9, I get "Unable to import module 'lambda_function': /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /opt/python/cryptography/hazmat/bindings/_rust.abi3.so)" |
@IRISDavidD How did you get this working in 3.9? |
Reply no I haven't - still on 3.9 and upgrading all our snowflake lambdas to 3.9 from 3.8 before the depreciation date |
@sfc-gh-yixie unfortunately this does not work for me. |
hey @IRISDavidD @FreyGeospatial , are you still observing the issue? I would recommend you to try, inside your docker image, using Python >= 3.8 and only pip installing the latest connector first to see if connector alone works, and then we can gradually add back other dependencies back to see which are conflicts and how to resolve them. |
Python version
3.12
Operating system and processor architecture
Linux-6.5.11-linuxkit-x86_64-with-glibc2.34
Installed packages
What did you do?
What did you expect to see?
Layer usage but instead get the following error
cannot import name 'Mapping' from 'collections'
Can you set logging to DEBUG and collect the logs?
The text was updated successfully, but these errors were encountered: